From the course: Software Architecture: Patterns for Developers
Unlock this course with a free trial
Join today to access over 24,700 courses taught by industry experts.
Model-View-Presenter
From the course: Software Architecture: Patterns for Developers
Model-View-Presenter
- [Instructor] The Model-view-presenter pattern, or MVP, is an evolution or variation of the model-view-controller pattern. In MVP, again we see three important components, the Model, the View, and the Presenter. The user interacts with the View, which passes on commands or events to the presenter. The presenter then manipulates the Model and tells the View which data to display and how. There are two variations of MVP. If all the UI logic is in the Presenter, we call it Passive view. On the other hand, the UI could contain all the necessary details on how to render the data, and we would use the Presenter for more complex logic. This is called Supervising controller and is more common these days because the current state of UI technology and markup languages allows us to put quite a bit of logic in the UI. Just make sure it's UI logic and not business logic. The MVP pattern is a great pattern for desktop or mobile applications. Instead of making your user interface manipulate the…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.