~/talk

Architecting an app with MVP and ViewModels

Talkat droidCon NYC 2018 · 2018-08-27..08-28· [android, frontend-architecture]
links:none on file
slides:none on file

SeatGeek refactors MVP into an explicit unidirectional flow called MVMVP that moves state out of presenters into Android ViewModel + Kotlin data classes, uses BehaviorRelay and RxJava for observable state, and exposes a single mutation API — sendToViewModel reducers — to serialize updates. Activities observe the ViewModel (or use Android Data Binding to render state) so presenters shrink to event handlers; testing stays similar, async scheduling is controlled in tests, and the pattern reduces view-state bugs and survives config changes.

AI-written summary · about

  1. 0:00Introduction and background
  2. 1:54Demo app setup
  3. 2:57Basic MVP implementation
  4. 6:05Adding async to MVP
  5. 10:39Challenges with async MVP
  6. 12:46Introducing ViewModel
  7. 15:54Integrating ViewModel with MVP
  8. 18:45MVMVP contract and state
  9. 20:51Presenter implementation
  10. 21:34Activity with ViewModel
  11. 23:21Drawbacks of MVMVP
  12. 24:28Simplifying with data binding
  13. 27:14Data binding setup
  14. 28:38Alternatives and summary
~/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.