I Wrote an App Using Architecture Components… And Here’s How It Turned Out
summary
A reminders app is built from scratch using ViewModels (MVVM), Room, LiveData and some RxJava; it persists data with Room and delivers UI updates via LiveData so Room auto-updates LiveData and ViewModel survives rotations while the dev uses SingleLiveEvent not in library for one-shot UI events. ViewModel tests run as fast JVM tests; Room requires emulator/device tests and manual threading. Overall the architecture yields a maintainable, testable app with a few onboarding gotchas.
AI-written summary · about
chapters (17)
- 0:00Intro
- 1:00Architecture Components
- 5:44App Setup
- 8:04Live Data
- 11:20Mutable Live Data
- 12:53Single Live Event
- 15:00Testability
- 17:15Should You Use Live Data
- 17:49View Models
- 21:18Testing View Models
- 23:18Should You Use View Models
- 23:51Room
- 27:09Repository
- 27:29Testing
- 30:32Should You Use Room
- 31:31Room with Java
- 35:06Recap
related talks
39mClean app design with Architecture Components
47mClean app design with Architecture Components
30mClean App Design with Architecture Components
41mViewModels, LiveData and Lifecycles, oh my!
28mHands-on Android Architecture & Architecture Components
47mAndroid Architecture Component
36mArchitecture Components The one that got away
42mHands on MvRx: Building Real Apps
