Going back to ASP.Net Webforms from ASP.Net MVC. Recommend patterns/architectures

asp.net-mvc

To many of you this will sound like a ridiculous question, but I am asking because I have little to no experience with ASP.Net Webforms – I went straight to ASP.Net MVC.

I am now working on a project where we are limited to .Net 2.0 and Visual Studio 2005.

I liked the clean separation of concerns when working with ASP.Net MVC, and am looking for something to make webforms less unbearable. Are there any recommended patterns or practices for people who prefer asp.net MVC, but are stuck on .net 2.0 and visual studio 2005?

Best Answer

I would recommend Model View Presenter ( MVP ). We used this on a recent WebForms app and it increased our testability and allowed us to enforce separation of concerns.

http://msdn.microsoft.com/en-us/magazine/cc188690.aspx is a great article by Jean Paul Boodhoo on this pattern; the code download is good also. You may find you don't need DTOs and interfaces for DTOs though.

Another good article is this one on codeproject.com: http://www.codeproject.com/KB/architecture/ModelViewPresenter.aspx

Edit: there is also a framework called WebForms MVP but I don't know much about it.