Tuesday, July 25, 2006

MVP RIP

If you have ever tried to unit test an aspx page then you've probably discovered that the tight coupling with the ASP.NET runtime makes this task difficult if not impossible. Of course there are other options such as Selenium or NUnitAsp but these are really integration testing tools - the tests are several orders of magnitude slower to run and time consuming to write and maintain.

The answer was the Model View Presenter (MVP) pattern. This is a variation on the classic Model View Controller pattern with a paper thin View layer (note to Microsoft - the code-behind is the View and NOT the Controller!). An excellent article on how to implement MVP in ASP.NET was written by Bill McCafferty.

However MVP is dead. I know this because Martin Fowler says so. Of course it's not really dead, it's simply been split into the Passive View and Supervising Controller/Presenter patterns. I'm still digesting the implicatioins of this change and will be sure to comment more on it later.

2 Comments:

Anonymous Anonymous said...

I really like when people are expressing their opinion and thought. So I like the way you are writing

7:25 PM  
Anonymous Anonymous said...

This is my first visit here, but I will be back soon, because I really like the way you are writing, it is so simple and honest

12:54 PM  

Post a Comment

<< Home