Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Flux: A modern way of doing MVC?

SQUER Solutions
March 13, 2018
1.6k

Flux: A modern way of doing MVC?

Voxxed Days (Vienna, Austria)

video: https://www.youtube.com/watch?v=h9SDuTSy7ps

SQUER Solutions

March 13, 2018
Tweet

Transcript

  1. UI-State-Management record state session state screen state GUI Architectures -

    https://martinfowler.com/eaaDev/uiArchs.html @duffleit @oetzn
  2. UI-State-Management record state session state screen state GUI Architectures -

    https://martinfowler.com/eaaDev/uiArchs.html ensure consistency @duffleit @oetzn
  3. Bliki > Google “Different people reading about MVC in different

    places take different ideas from it and describe these as 'MVC’.” - Martin Fowler @duffleit @oetzn
  4. AbstractUIStateManagementPattern mvc = PatternStore.load(Patterns.MVC);
 // todo: use DI here Web

    theWeb = new WebFactory().create();
 try {
 theWeb.apply(mvc);
 } catch (PatternApplicationException e) {
 // never happens
 } @duffleit @oetzn
  5. Make it to the talk in time Fix DI-Todo Get

    Wunderlist mark as done Todos: <li class=“done”>...</li> <li>...</li> mark as done @duffleit @oetzn
  6. Server Client Model Controller View Controller View HTTP-Request HTTP-Response JSON

    <li class=“done”>...</li> todo -> todo.addClass(“done”) HTTP-Request HTTP-Response @duffleit @oetzn
  7. Single Source of Truth Model Controlle r View Model Controller

    View Model Controller View @duffleit @oetzn
  8. Single Source of Truth Model Controlle r View Model Controller

    View Model Controller View @duffleit @oetzn
  9. Structure • View → React • Model → Store •

    Controller → […] Goals • Unidirectionality • Predictability • Single Source of Truth • Consistently Display Data @duffleit @oetzn