Driving View-State through Data for Fun and/or Debugging
summary
Argues that every mutable UI element is a serializable model and shows a working iOS clocks app (based on Apple’s master‑detail template) where a separate view-state model drives presentation instead of being a side effect. Demonstrates an undo/redo slider and independent rewind of view state versus document, plus reproducible bug hunting via JSON playback of logged states. Code is on GitHub at MattGallagher/doc/clocks and the approach visibly enables time‑travel debugging and easier UI testing.
AI-written summary · about
chapters (13)
- 0:00Introduction
- 1:00ModelViewController Change Pattern
- 3:13ModelViewController in Apps
- 8:26DataDriven vs PresentationDriven
- 10:40Consequences of PresentationDriven
- 11:23The Problem
- 12:25The Document
- 13:09The Views
- 15:50Applying the Models
- 19:24Time Travel
- 20:22Testing
- 22:37Drawbacks
- 23:46Conclusion
related talks
27mPut it All in State
28mThe Art of Functional State Management
43mGood Intentions II: Enemy of the State
19mThe Art of Functional State Management for iOS Apps
34mFunctional UIs and Unidirectional Dataflow
40mCoding Complex App Logic, Visually
45mExploring the possibilities of Unidirectional Data Flow Architectures on Android (en)
31mThe Swift Behind SwiftUI
