views:

788

answers:

3

Possible Duplicates:
What are MVP and MVC and what is the difference?
mvc and mvp pattern

Folks,

What are some of the benefits of using MVC over MVP? I like that I don't have to use a framework for MVP and can be implemented via interfaces and classes. I still get the separation of concerns that MVC has and I get unit testing. What are some benefits of using MVC over MVP?

+5  A: 
Allen
Funny- I hadn't seen that before.
RichardOD
+1  A: 

Since I have been scrutinized by my comments about duplicates, I will just reference this SO questions and leave it to the "higher powers" to close if they see fit :P
http://stackoverflow.com/questions/2056/what-are-mvp-and-mvc-and-what-is-the-difference

SwDevMan81
DUPE!! oh noes!
Allen
A: 

People get too hung up on initials and TLA's sometimes.

If what Phil Haack says in his article is true, I thought I was using MVC in ASP.NET MVC, but what I am really using is MVP (or a tweaked form of MVC).

With MVC, it’s always the controller’s responsibility to handle mouse and keyboard events. With MVP, GUI components themselves initially handle the user’s input, but delegate to the interpretation of that input to the presenter.

But that's not what ASP.NET MVC is really all about.

If I handle mouse and keyboard events, I like to do it in the browser with jQuery. That separates the user interaction from the controller, and provides for better decoupling between the UI layer and the "business" layer.

If I need to update part of my page using an AJAX call or JSON call, I am still going to need to do that anyway, whether I call it MVC or MVP.

ASP.NET WebForms, for example, attempts to emulate the rich client development paradigm via the use of ViewState. This is why many attempts to apply patterns to ASP.NET focus on the MVP pattern because the MVP pattern is more appropriate for a rich client application with GUI components.

However, many web platforms embrace the stateless nature of the web and forego attempting to simulate a state-full rich client development environment. In such systems, a tweaked MVC pattern is more applicable.

It is clear that Phil views (a tweaked form of) MVC as a move to a more stateless, thinner client, whereas MVP places more responsibility on the UI layer for providing a rich user experience.

Whether this is a good thing or not is subjective. If ASP.NET is MVP and ASP.NET MVC is MVC, I'll gladly accept the MVC initials to give up things like viewstate and obtuse logic.

Robert Harvey
What if the whole reason you are trying to decide is, you want to use the some business layer for a web version and a thick client version ;-) aaak
FastAl