Jeremy D. Miller -- The Shade Tree Developer : Test Driven Development with ASP.Net and the Model View Presenter Pattern
Jeremy D. Miller -- The Shade Tree Developer : Test Driven Development with ASP.Net and the Model View Presenter Pattern: "The traditional approach for building maintainable user interface code is to separate the typical concerns of a user interface with the Model View Controller (MVC) pattern. Unfortunately, ASP.Net is optimized for Rapid Application Development, not for creating maintainable code. A common criticism of the ASP.Net development model (and ASP classic before that) is that it does not enforce or even encourage a clean Model View Controller separation. Many ASP.Net applications seem to be a jumble of data access code, HTML markup, and business logic, but it doesn’t have to be that way. By itself, the “code-behind” model in ASP.Net does not do enough to create a good separation of concerns. Plus it’s difficult to get code-behind code into unit tests.
My preference is to use the Model View Presenter pattern to structure ASP.Net code to create maintainable and testable solutions. I think of MVP as just a flavor of MVC, but it’s worth stating the differences. The central fact of MVP architectures is that the “view” is a very shallow wrapper around the actual screen. Unlike most traditional MVC implementations, the view classes are entirely passive. The Presenter classes are the active classes that are responsible for initiating the view processing. "