Unidirectional Data Flow Architectures


After watching the excellent talk, I felt the need to summarize it so it can stick to my mind. As the title suggest, the talk focuses on frontned unidirectional data flow architectures as opposed to those relying on model binding (i.e. two-way data flow).

Two-way databinding Two-way databinding Unidirectional UI Architecture Unidirectional UI Architecture


Flux Architecture View is listening for events from the store, sends events/actions to the dispatcher, and the store is listening for events from the dispatcher. In essence, the dispatcher is an event bus.


  • The dispatcher simplifies the events' lifecycle.


  • Concurrency and data sharing between stores.
  • Difficult to reuse (not fractal)


Redux Architecture A variation of flux where now we also have a single store that contains the dispatcher. Reducers are pure functions responsible for managing the state (old state + action => new state). View provider allows redux to be reused with different front end frameworks/libraries (e.g. Angular, React, ...)


  • Now the store is also a singleton.
  • Reducers are easy to test and predictable.


  • Still not fractal
  • Not very beginner friendly (middlewares, providers, containers, ... what?)

BEST (Behaviour, Event, State, Tree)

BEST Architecture Direct correlation with MVC => M = State, View = Tree, Controller = Behaviour + Event. State and Tree are declarative (have no logic).


  • Simple State and Tree
  • Easy to reuse.


  • Can be a bit difficult to keep track of state changes
  • Not used much.

Model View Update (ELM)

Model View Update Architecture Very much like redux because redux was inspired by ELM (so, redux is the copycat here). All components are hirarical and can accomodate several inner layers.


  • Fractal and simple


  • Lots of wrapping and unwrapping

Model View Intent (CycleJs)

Model View Intent Architecture View has no event handlers. Those are injected by the intent layer. All communications are performed by means of exposing an observable steam which is consumed by the next component.


  • Fractal, generic, and flexible.
  • Reactive everywhere (how components communicate)


  • People don't like reactive streams (yet!)

Further reading

  • How each handles server communications?