Good Intentions II: Enemy of the State
summary
Claim: revive state machines to strip responsibilities out of ViewControllers and make app behavior explicit. Uses Apple’s WWDC-style state machine: states as string-based states, transitions as a dictionary, and delegate hooks that map to didEnter/didExit selectors. Concrete results: an async data source modeled with five-state data source logic, a branching appointment flow spanning about a dozen-screen wizard, and session management via a state machine; adding a reschedule path takes minutes not days. The implementations reduce ambiguity and work in production.
AI-written summary · about
chapters (12)
- 0:00Introduction
- 1:30Intention
- 4:25State
- 6:24State Machines
- 8:11Apple State Machine
- 14:02Implementing Logic
- 15:40Data Source
- 19:03Navigation
- 26:25State Machine
- 27:58Changing Requirements
- 30:03Session Management
- 35:44Conclusion
related talks
24mLeveraging the Power of State Machines in Swift
28mState machines for frontend state management
41mFinita la State Machine — MVI in an iOS App
44mState Machines and Hopeful Dreams
20mSetState, We Need to Talk!
28mThe Art of Functional State Management
38mInto the Visual World of State Machines
37mReactive State Machines and Statecharts
