From the course: Software Architecture: Patterns for Developers

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Model-view-presenter (MVP)

Model-view-presenter (MVP)

From the course: Software Architecture: Patterns for Developers

Start my 1-month free trial

Model-view-presenter (MVP)

- The model-view-presenter pattern or MVP is an evolution or variation of the model view controller pattern. In MVP, there are 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 where. There are two variations of MVP. If all the UI logic is in the presenter and the view has no notion of the model, we call it passive view. On the other hand, the UI could contain all the necessary details on how to render the model 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. The MVP pattern is a great pattern for desktop applications. Instead of making your user…

Contents