@DAlooG
APPLE SOLUTION
https://developer.apple.com/library/ios/documentation/General/Conceptual/DevPedia-
CocoaCore/MVC.html
7
Slide 8
Slide 8 text
@DAlooG
PROBLEMS
➤Controller need to rule view and model
layers
➤View receive updates. So order of updates
is important
➤Model receive updates. So order of
updates is important
➤Controller is bloated with responsibilities
8
«
@DAlooG
I say with confidence as a former
UIKit author: React's model for the UI
layer is vastly better than UIKit's.
React Native is a *huge* deal.
https://twitter.com/andy_matuschak/
status/560511204867575808
11
Slide 12
Slide 12 text
@DAlooG
UI = VIEW(DATA)
View layer is an function from data to user
interface
12
Slide 13
Slide 13 text
«
@DAlooG
One can merge the MVC roles played
by an object, making an object, for
example, fulfill both the controller
and view roles—in which case, it
would be called a view controller.
http://apple.co/1U6DPF3
13
@DAlooG
APPLE SOLUTION
https://developer.apple.com/library/ios/documentation/General/Conceptual/DevPedia-
CocoaCore/MVC.html
19
Slide 20
Slide 20 text
@DAlooG
SERIOUSLY?
20
Slide 21
Slide 21 text
@DAlooG
FLUX
https://facebook.github.io/flux/
21
Slide 22
Slide 22 text
@DAlooG
➤Store
➤View
➤Action
➤Dispatcher
22
Slide 23
Slide 23 text
@DAlooG
ACTION / COMMAND
➤Representation of increment
➤User actions (tap, gestures, shake)
➤API callbacks
➤Timer events
➤Action is immutable
➤Action is serializable
➤Action is printable
23
Slide 24
Slide 24 text
@DAlooG
ACTION / COMMAND
24
Slide 25
Slide 25 text
@DAlooG
STORE / REDUCER / UPDATE
➤Stores data
➤Update data according to actions
➤Notify listeners about data updates
➤Most application logic lives here
➤Covered with Unit Tests
➤Implemented as class
25
Slide 26
Slide 26 text
@DAlooG
STATE
➤Immutable value type
➤Valid most of the times
➤Domain specific
➤Implemented as struct
26