Model-view-presenter (MVP) introduction
The introduction of mvp on the wiki is
- Model defines the data model that needs to be displayed in the user interface, a model contains related business logic
- View View should not handle business logic, switch views according to the presenter's command, listen to the user's event and pass it to the presenter.
- Presenter handles view events, is responsible for business logic, retrieves Model to get data, and handles View accordingly
Class Diagram Reference
demo
https://github.com/googlesamples/android-architecture/tree/todo-mvp