Peristence as the Single Source of Truth
summary
Claims that driving UI exclusively from persistence (PSST) makes Android apps offline‑first, unidirectional and easy to debug. Implements examples: login flow with repository outside lifecycle, Reddit list/comments using ID-based subscriptions, immediate comment showing by saving inflight/synced/failed statuses to database and retrying with WorkManager/JobScheduler. Uses Room for compile‑time SQL checks and RxJava streams; shows real apps' behaviors (Relay blocks, Sync toasts, Flamingo saves drafts) and a side project where the pattern works and survives config changes.
AI-written summary · about
chapters (10)
- 0:00Introduction and motivation
- 2:49State management challenges
- 4:58Introducing PSST concept
- 6:21Login screen example
- 11:37Reddit submission details
- 17:46Comment screen UX comparison
- 24:49Handling failed network calls
- 25:11Common persistence excuses
- 29:27PSST advantages recap
- 31:15Useful libraries and conclusion
related talks
20mData Persistence In Android: There’s Room For Improvement
27mNetworking & Persistence in Mobile Applications at Scale
40mOffline Mode, Online Impact
45mExploring the possibilities of Unidirectional Data Flow Architectures on Android (en)
34mOffline-First Mobile App Design
43mOffline-first Architecture - How to survive without the internet?
25mThe New Modern Data Persistence on Android - Meet Jetpack Datastore
28mOffline first applications in React Native done well
