Passive View MVP
TODO: write about ...
- View does not communicate with Presenter; View just receives/responds to all the Presenter's actions
- View Interface tends to define
- methods and properties to allow the Presenter to manipulate the View and send data to the View from the Model
- events to tell the Model that the user has done something (such as having clicked the Add or Delete button)
- View tends to not have any specific knowledge about the Model. In the Passive View, the View and the Model are often completely decoupled.
- Passive View makes the Presenter highly testable, but it also means that the Presenter has a lot more code, because the Presenter must tell the view absolutely everything about the data the View needs in addition to responding to user events delegated through the View
- Passive View and Supervising Controller have this in common
- View
- both delegate user events to the Presenter
- the markup tends to be the same
- Presenter - knows about
- the model (or at least the model's Interface)
- only the View's interface
- Model's design is the same in both places
- Key difference in Passive View & Supervising Controller
- View
- Interface tends to look different
- (Passive View) interface tends to just have properties for "small" pieces, not the Model in its entirety
- (Supervising Controller) view interface will have events and a reference to the Model