Android Architecture Component
summary
Covers Android Architecture Components with concrete code examples and practical rules: LiveData is lifecycle-aware and only notifies active observers; ViewModel survives configuration changes so network or DB results aren’t lost; Room maps entities to SQL, enforces compile-time query checks and exposes DAOs; Retrofit is used for remote fetches and a Repository becomes the single source of truth. Warns to avoid holding Context in ViewModel (use AndroidViewModel for safe app context) and shows shared ViewModel between fragments.
AI-written summary · about
chapters (19)
- 0:00Introduction and speaker intro
- 5:03Why Android architecture components
- 7:13Overview of architecture components
- 11:37Problems solved by components
- 13:03Google’s proposed architecture
- 15:09Lifecycle component explained
- 21:28Implementing lifecycle without appcompat
- 24:01ViewModel component deep dive
- 27:12LiveData in ViewModel
- 29:03Sharing data between fragments
- 31:14ViewModel with MVP pattern
- 33:21LiveData benefits and usage
- 36:17Room database introduction
- 37:20Room components and setup
- 39:05Room queries and compile-time checks
- 40:36Testing and error handling
- 44:04Custom lifecycle owners
- 45:08Fragment vs ViewModel differences
- 46:19Q&A session
related talks
44mAndroid Architecture Components, a New Way to Build Apps
44mARCH Components
20mArchitecture Components
31mAndroid Architecture Components
38mAndroid Architecture Components
28mInternals of Android Architecture Components
41mViewModels, LiveData and Lifecycles, oh my!
45mAndroid Architecture Components Considered Harmful
