WWDC 2014 – Advanced iOS Architecture and Patterns – V229

Design Information Flow (Truth, derived value, creation of new truth)

Think about of system in terms of how information is moving through. Considering first where is truth, who really knows that state.

Derived values
– It computes from inputs
– Needs to recompute when input change
Similar to a cache (not so sure about this one… cache doesn’t recompute with input changes?!)
let the model control the derived values
– Create new truth for updating model, creating a working copy of the original model. Once the “suggested” changes are validated, they are copied over to the original one.

Define Clear Responsibilities and use composition of smaller peaces that hold responsibility inside a bigger responsibility

Simplify with Immutability.
Mutability increases dependencies, object references moving through different controllers makes those controllers dependant on how they work with the object

Swift Structs are passed by value to functions, an implicit copy is made.

Leave a Reply

Your email address will not be published. Required fields are marked *