Elapsed

00m

Unidirectional JavaScript apps

With mercury

@Raynos

Overview

  • What is a unidirectional app
  • How does it compare to MV* and FRP
  • Building a unidirectional app with mercury

A unidirectional app

Unidirectional: A term coined by react engineers to describe the data flow of an application

How it works

A Nested Unidirectional app

Unidirectional responsibilities

  • Bootstrapping application (Components)
  • Translate Raw input into user intent (Input)
  • Update application state (Update)
  • Notify UI of changes (State)
  • Render the UI (Render)

An immutable unidirectional app

  • No two way data binding
  • No two way references between concerns
  • No mutable references between concerns

An immutable unidirectional app

Comparing to MV*

From Wikipedia

Comparing to Smalltalk MVC

From a 1996 paper by Potel about MVP

Comparing to Flux/React

Demo time!

Q&A time!

Don't be shy

ask me anything!

Q&A topics

  • Why is this a good idea
  • How do these ideas help developers
  • How does modular development come into play
  • How does this compare to React/Flux/MVC/X

Thanks.


@Raynos


Oh, and we're hiring:

jakev@uber.com