- The Model defines the data to be displayed in the user interface (UI)
- The View is an interface that displays data (the model) and routes user commands to the presenter to act upon that data
- The Presenter handles both the model and the view. It retrieves data from repositories, persists it, manipulates it, and determines how it will be displayed in the view. The Presenter provides all the UI logic
MVP - Passive View Pattern
- The View is as dumb as possible and contains almost zero logic.
- The View and Model are completely separated from one another.
- The Presenter is a middle man that talks to the View and the Model.
- The Model may raise events, but the Presenter subscribes to them for updating the View.
- There is no direct data binding. The View exposes setter properties which the Presenter uses to set the data.
- All state is managed in the Presenter and not the View.
+ clean separation of the View and Model
- more work (for example all the setter properties) as you are doing all the data binding yourself
MVP - Supervising Controller Pattern
- The Presenter handles user gestures.
- The View binds to the Model directly through data binding. In this case it's the Presenter's job to pass off the Model to the View so that it can bind to it.
- The Presenter will also contain logic for gestures like pressing a button, navigation, etc.
- less testability (because of data binding)
- less encapsulation since the View talks directly to the Model