Building better Android apps with MVP
summary
Argues for Model-View-Presenter with concrete code patterns: a Screen interface that abstracts activities, a Presenter method that calls launchNextActivity instead of creating intents, and tests that run as Presenter tests on JVM using Mockito so most behavior needs no device. Shows PostActivity unit tests that verify adapter updates and error displays, describes using Observables/Rx for API calls, and a lightweight cache/manager class that lives outside the Android lifecycle.
AI-written summary · about
chapters (12)
- 0:00Start
- 2:02Separation of Concerns
- 5:35Sample App
- 6:06Main Activity
- 8:13Presenter Constructor
- 14:56Post Activity
- 19:29Test the Presenter
- 23:23Show an Error View or Network Error
- 23:53Instrumented Unit Test
- 24:24Functional Test
- 26:11How Mvp Is Better than any Vm
- 30:52Use an Rx Java Implementation
related talks
42mTestable Android Architecture
39mMVP: The Life-Changing Magic of Tidying Up Your Android Presentation Layer
30mArchitecting an app with MVP and ViewModels
39mClean app design with Architecture Components
56mMVP — Common Tasks and Ways to Solve Them in Moxy
47mClean app design with Architecture Components
34mMVWTF: Demystifying Architecture Patterns
28mHands-on Android Architecture & Architecture Components
