Search code examples
model-view-controllerdesign-patternsmvp

What is Model View Presenter?


Can someone please explain in a way as simple as possible what the Model View Presenter pattern is? What is the difference with Model View Controller ? Which is best or for which purpose ?


Solution

  • Martin Fowler has a page on UI design patterns, in which he defines and then talks about MVC, MVP and other patterns.

    http://martinfowler.com/eaaDev/uiArchs.html

    To summarise the differences, Controllers in the MVC have more control over the UI, and handle events, while a presenter in the MVP is more passive, and just presents information through the UI.

    In general there's not much difference, and often the line between them is blurry.