I'm looking for feedback on MVP and MVC patterns used as a framework to build a website. I've used both with a certain degrees of success and failure. Furthermore I've worked in places which have miserable implement MVP across the web, desktop and services layers. I've also seen a few terrible MVC implementations. One thing I've noticed is the MVP stuff-up appear terrible for maintenance or adding any new features compared to the MVC debacles.

MVP - Model View Presenter http://en.wikipedia.org/wiki/Model-view-presenter

"The View holds a reference to the Presenter. The Presenter is also reacting to events being triggered from the View, so its aware of the View its associated with. The Presenter updates the View based on the requested actions it performs on the Model, but the View is not Model aware."

MVVM pattern was designed to support WPF and Silverlight. It's similar to MVP, in the concept the view doesn't know about the model however its not MVP.


4 Answers 4


I guess you're asking in the context of the Microsoft world?

It was my understanding that MVP was mainly employed for unit testing the controllers of the application. I think another term for the MVP pattern is Supervising Presenter.

The view in this case would be the ASP Page, which would have an instance of the Presenter, and any events in the page (click handler's for example) would delegate their work to the Presenter. The Presenter would have a reference to the View (although, through an IView interface that the Page would implement). The Presenter would then respond to actions from the View, do something, update the model and pass it back to the view or perform actions on the View via the interface.

This aids unit testing, because the Presenter (where any presentation logic should be) can have the view mocked out. Typically a Presenter would also have references to other services, which should rely on dependency injection (via constructor injection IMO) to also allow for the Presenter to be tested in isolation (a proper unit test).

The main reason I think to use MVP in ASP.NET WebForms is because the Page class is tied to the ASP.NET runtime, whereas because ASP.NET MVC has abstractions on things like the HttpRequest, and the controller and ActionResult classes can be tested in isolation, you don't need to employ MVP - it's unit testable by default.

So to answer (I think): I'd use MVP if I was using WebForms, to aid testability. Otherwise I'd use MVC.

Also check out the Web Client Software Factory, which offers a framework for a starter point for implementing the MVP pattern.

  • And yeah, MVVM if you're doing WPF/Silverlight, or JavaScript & HTML with knockout.js (or other libraries). Commented Jun 21, 2011 at 9:14
  • cheers @jamiebarrow, the web client software factory looks very interesting, thanks for the info and feedback.
    – Nickz
    Commented Jun 21, 2011 at 23:36

There are ways to meld the two. For instance with ASP.NET MVC you can use the regular MVC pattern, but have the Views strongly bound to a ViewModel (as in MVVM, a descendant of MVP). This gives the benefits of MVP (i.e., decoupling the view from the specificities of the domain model) while also having a dedicated layer to handle events.

I haven't tried applying this outside of .NET, however.

  • 1
    Cheers for the feedback. I've used MVC in java and .net. While I've used MVP in .net webforms, which I felt was a disaster.
    – Nickz
    Commented Jun 21, 2011 at 1:17
  • 1
    @Nick: MVP would be a better fit for Winforms than Webforms, because you don't have to deal with the page life cycle and view-state. Commented Jun 21, 2011 at 1:27
  • Yes I agree I'm dumbfounded why the decision was made, which is one of the reasons I'm asking the question. I have minimal experience using MPV with java, .net or any other language unlike MVC. I wanted to know what were others experience using MVP or MVC and the result. Why would use each pattern and when. Cheers @Robert.
    – Nickz
    Commented Jun 21, 2011 at 1:44
  • 1
    @Nick: I would not attempt MVP on webforms without some sort of library or framework to help me, like this one: webformsmvp.codeplex.com/releases/view/63338 Commented Jun 21, 2011 at 1:47
  • Unfortunately it's probably too late to implement this, the project nearly 2 yrs old. There got a very generic MVP framework, all of the normal web forms controls have been re-written as MVP controls, it very comprehensive and complicated. Cheers @Robert
    – Nickz
    Commented Jun 21, 2011 at 2:07

Depends on what you're doing. If you're stuck using WebForms, MVP is your only real choice to do things properly with that beast. If you can use MVC, use that, otherwise use MVP or some variation thereof.


At the end of the day which is best is, as always, dependent on what you're developing.

Disclaimer: I haven't really looked into MVP all that much, but from what I've read...

It would seem to me that the MVP model may make sense in an application where the client is responsible for what would otherwise be MVC controller actions such as saving, editing, deleting etc via AJAX (or websockets) - the importance being that the business logic is held within the client-side (view is responsible for) javascript.

Personally, I would consider it poor design if the view (in whatever backend language) itself contained logic for database transactions. I like the decoupling that the MVC pattern offers, making views as stupid as possible. To me, MVP seems to be almost taking a step backwards in development practices.

Just my opinion though :)

  • I tend to agree with a few of ur points, MVP (similar to Microsoft's Silverlight/WPF MVVM pattern) creates a lot of events and actions. Which leaves you with another layer of abstraction to the web. Cheers for the feedback.
    – Nickz
    Commented Jun 21, 2011 at 1:30

Not the answer you're looking for? Browse other questions tagged or ask your own question.