~/talk

Bloated ViewModels? What Next

Talkat droidcon Berlin 2022 · 2022-07-06..07-08· [android, frontend-architecture]
links:none on file
slides:none on file

Android ViewModel usage narrows to one concrete claim: dumping business logic into Android Architecture Components ViewModels turns them into 900–2,000 lines god objects that cause UI lag and hard-to-maintain multi-module code. Fixes attempted include split by UI components (creates dependency and duplication), cohesive data boundaries with wrapper classes (reduces noise but adds files, complex boundaries and more tests), and many small ViewModels. Practical guardrails that work: enforce metrics (flag large files, block PRs) and clear boundary guidelines; each approach trades simplicity for test and onboarding cost.

AI-written summary · about

  1. 0:00Introduction
  2. 2:33Starting with ViewModels
  3. 6:52ViewModel Bloat Problem
  4. 8:36Causes of Bloated ViewModels
  5. 11:26Solutions to Consider
  6. 12:33Splitting by UI Components
  7. 15:22Grouping by Cohesive Data
  8. 19:20No One-Size-Fits-All
  9. 20:21Proactive Quality Checks
  10. 21:48Q&A
~/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.