A Lesson by Donn Felker
In this Lesson you will learn:
- Build a Presenter (the “P” in MVP) based off a contract (interface)
- How to implement the interface in an implementation
- How to to rely on the UserView (the view) and UserRepository (repository pattern) abstractions (interfaces) instead of their concrete implementations
- How to have the presenter control all UI logic such as obtaining state, setting state, and UI messaging.
- How to inject the presenter interface through Dagger into the View (the fragment).
- How to wire up the presenter and the view together with the userPresenter#setView call.
- How the presenter takes over all orchestration during execution of the application with a live walkthrough of the running application code.
Links for this Lesson
Pro members: Log in to view the code for this Lesson!
Lessons in this course
- Lesson 48: Model View Presenter – Part 1: The MVP Pattern Explained
- Lesson 50: Model View Presenter – Part 2: Building the View
- Lesson 51: Model View Presenter – Part 3: Wiring up the Presenter
- Lesson 53: Model View Presenter – Part 4: Writing FAST jUnit JVM Tests with Mockito
- Lesson 54: Model View Presenter – Part 5: Validating Code Coverage with jUnit 4, Mockito and Android Studio
- Lesson 55: Model View Presenter – Part 6: Getting to 100% Code Coverage
- Lesson 57: Model View Presenter: Part 7 – Removing Lifecycle Events from the Presenter
- Lesson 61: Model View Presenter – Part 8: The ViewNotFoundException & Comprehensive Testing