views:

53

answers:

1

I have developed web applications for a couple of years with ASP.NET Webforms and I still like it, above all because of the RAD possibilities, it provides. Since two years ASP.NET MVC is now available as a direct competitor to the classic ASP.NET. Somehow I don't want to throw away all my Webforms experiences and move to ASP.NET MVC. One reason is, that I also deal with desktop application development and ASP.NET Webforms is more similar to it.

Now I discovered that there is a third approach for ASP.NET development: ASP.NET MVP: http://webformsmvp.com/

Does anybody has already experiences with this third type of ASP.NET ?

Is this a official approach of Microsoft respectively is it supported by Microsoft ?

Is it worth to take a more detailed look on it ?

Is it a promising combination of both ASP.NET "worlds" ?

+1  A: 

This is obviously a subjective opinion and it depends on the particular problem you're solving.

If you have a simple application, that won't need a lot of ongoing maintenance, and where it's important to demonstrate rapid results, I think it would make sense to use MVP for exactly the reasons you mention - leveraging team skillsets and RAD.

For anything more complex, I don't think it's a good idea. As you mentioned, MVP is similar to desktop GUI models; ASP.NET MVC is designed for the request-response nature of the web. The view architecture, particulary with the introduction of EditorFor and DisplayFor, is optimized for use as a template that pulls data from the model.

From a testability standpoint, MVC does a very good job in allowing you to unit test small components. I think you would lose a lot of those benefits with MVP as the view and presenter are more tightly coupled. In essence, MVC adopts the concept of the "Humble Dialog" pattern which seeks to minimize UI code because it's inherently untestable. (ASP.NET) MVC also embraces the web, producing clean HTML designed to be css styled and augmented with javascript (jquery). I think MVP encourages you to treat the view as a canvas of "widgets", which seems to always end up producing markup you have to fight with.

Lastly, I think whenever you use a platform that's designed to support one approach (MVC) and slightly alter it (MVP), you end up swimming upstream. You don't get to leverage the advice, articles, and technology development that naturally sets up around the mainstream approach. For example, personally I would rather use an alternate view engine with MVC in lieu of the WebForms engine. But I haven't made that move because it's non-standard. Sometimes "standard" beats better.

Rob