~/talk

Composing ViewModels:Breaking ViewModels into smaller self-contained UI models

Talkat Droidcon London 2023 · 2023-10-26..10-27· [frontend-architecture, android]
slides:none on file

Micro-features replaces one giant ViewModel with many self-contained UI models backed by a root Jetpack ViewModel that passes scope and SavedStateHandle; 80–90% of the existing domain layer stays reusable. Each micro-feature provides factory APIs for a composable and a UI model, registers/unregisters by logical configuration to show context-aware sets of items, and supports moving components between hosts. Implementation uses Compose, assisted factories, Kotlin Multiplatform-friendly UI models, and testing via unit tests, screenshot tests with Paparazzi and Espresso for integration plus end-to-end flows.

AI-written summary · about

  1. 0:00Introduction to micro-features
  2. 3:39Architecture requirements for new design
  3. 8:12Introducing micro-features concept
  4. 10:38UI model vs ViewModel comparison
  5. 14:30Composing ViewModels with micro-features
  6. 15:56Micro-feature architecture blueprint
  7. 17:22Implementing a micro-feature example
  8. 23:26Hosts and micro-feature integration
  9. 27:20Binding UI models and composables
  10. 30:30Scaling with dynamic host configuration
  11. 33:59Portability and multi-platform benefits
  12. 36:11Server-driven UI compatibility
  13. 37:34Testing strategies for micro-features
  14. 39:01Future improvements and next steps
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.