Unit 01 of 02
Application Architecture
UI, domain and data layers, a view model that survives configuration changes, state holders, flow-based observable state, unidirectional data flow and dependency injection.
Published Updated
Lessons
- 01 The Layer Model The layer model splits an app into UI, domain and data layers, and dependencies point only inward. The lesson measures whether the answer to a read comes from memory, disk, the network or a default. 10 min read
- 02 The View Model A view model holds screen data so that it survives a configuration change, but not process death. The lesson measures how the origin of a read changes when the screen rotates and when the process dies. 8 min read
- 03 State Holders A state holder gathers a screen's state in one place; saved state selects the fields that return even after the process dies. The lesson measures which origin each field of a screen returns from and with which saved fields. 8 min read
- 04 Observable State Observable state is a state flow that publishes a new value to collectors as its value changes; a flow always has an initial value. The lesson measures the origin of the value a collector reads before loading finishes and after it finishes. 7 min read
- 05 Unidirectional Data Flow In unidirectional data flow, events go up, state comes down, and the UI does not write state directly. The lesson measures which tier gives the answer when the new state built by a reducer that handles an event is read. 8 min read
- 06 Dependency Injection In dependency injection, a class does not build the objects it needs itself but receives them from outside. The lesson measures which tier answers a read in the production chain built by a container, and how the answer changes when the chain changes in a test. 8 min read