The Persistence Layer Playbook
summary
A practical checklist lays out Planning, Implementation, Testing and Maintenance with concrete recommendations: use HTTP cache-control and a disk cache to avoid the network, fetch with Retrofit, store and serve from Room as the single source of truth, and encapsulate refresh logic in a network-bound resource or downloader task. Examples show TV-guide style data that changes every few months, tradeoffs like a two-day cache vs immediate freshness, reactive queries plus transactions to avoid flicker, and migration and QA steps that make the system work in production.
AI-written summary · about
chapters (13)
- 0:00Intro
- 1:33Planning Identify Key Outcomes
- 4:19Cache Expiration and Network Bypass
- 10:43Loading and Error States
- 13:24Choose Your Database Library
- 15:12Separation of Concerns
- 16:33Single Source Of Truth
- 20:39Implementation One-Shot vs. Reactive Queries
- 25:37Document Your Rules And Diagrams
- 29:35Implementation Schema Design
- 32:45Inspect the Database
- 33:35Get Testers Up To Speed
- 34:13Handle Migrations
related talks
34mHow to reactively load and cache data without even trying
40mSmarter Application Caching with Kotlin Flow
40mClean, Easy & Stable Android Architecture
43mRoom: The official persistence library
29mDon't reinvent the wheel, use libraries: Modern Android Stack
40mApp Development - Pragmatic Best Practices
39mClean app design with Architecture Components
39mOffline Applications With Architecture Components, Retrofit, Room, Dagger, RxJava
