Learning the Model View Presenter Pattern

The guys over at Patterns and Practices got it right. They've put together a package (available via a CodePlex project here) on learning and understanding the Model View Presenter Pattern (MVP). It's kind of a "mini-guidance" package and not the big behemoth you normally see from these guys that:

  • Provides guidance on how MVP to promotes testability and separation of concerns within the UI
  • Illustrates how to implement MVP with standard ASP.NET
  • Illustrates how to implement MVP with ASP.NET and the Composite Web Application Block

The package contains full documentation on the pattern, unit tests, and source code (for both WinForms and CAB) demonstrating it. Very nice and very easy to digest! Check it out here if you're just getting started and want to see what MVP is about.

3 Comments

  • I don't really like what they did there. Having views like IContactDetailView puts the model into the view which is exactly what you are trying to separate. IMO Views should be things like Grid, Spreadsheet, Detail, etc which can handle any domain object (Contact, Customer, etc)

  • A view is a visualization of a specific set of information, not a general thing like a grid, etc. The P&P team did a great job, and implemented MVP in a way that is entirely consistent with the way hundred of thousands of developers worldwide understand MVP. Sorry if you don't agree.

  • "undred of thousands of developers worldwide understand MVP"

    I wasn't buying what you were saying at all until you implied that you are speaking canonical wisdom on behalf of hundreds of thousands of devs worldwide.


Comments have been disabled for this content.