David Hayden [MVP C#]

Sponsors

The Lounge

Wicked Cool Jobs

News

  • CodeBetter.Com Home

Other Links

Teas

Patterns & Practices

Florida .NET Developer

Book Reviews

Tampa ASP.NET MVC Developer Group

Advertisement

Images in this post missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at imagehelp@codebetter.com
MVP Bundle Screencast - Model-View-Presenter with and without WCSF

Microsoft Patterns and Practices released their MVP Bundle a few weeks back which diverges a bit from the other guidance bundles that we have seen in the past in that it is more about guidance on the Model-View-Presenter Pattern itself as opposed to providing any new controls and automation to help with web client development. I welcome guidance on proven practices in all its flavors, so I am happy p&p offers a good look at Model-View-Presenter using the WCSF as well as when not using the WCSF.

I have seen a few comments here and there from other developers on the MVP Bundle, but thought I would offer a more detail look at the quickstart examples by providing an MVP Bundle Screencast. I can't believe I talked for 29 minutes, which is twice as long as I have and will ever talk again in a screencast, but I wanted to drive home a number of concepts that are and are not offered in the guidance.

With regard to the MVP Quickstarts that uses the Composite Web Application Block ( CWAB ), I wanted to show off a few things in the example:

  • The ever so cool Add View ( w/Presenter ) Recipe that automates a lot of manual effort.
  • The Dependency Injection Services built into the CWAB via an ObjectBuilder Container.
  • The new MasterPage, Page, and UserControl Base Classes added to hide dependency injection.
  • The ObjectContainerDataSource Control for MVP using UI components that use DataSource Controls.

With regard to the MVP Quickstart that does not include the CWAB, I wanted to highlight:

  • The lack of all features mentioned above.
  • The horribly bad practice shown of letting the View wire up the ContactsController and ContactsDataSource Classes and their dependencies.
  • The use of 3rd Party Dependency Injection Tools that could be used ( Windsor, Spring.NET, StructureMap ) for DI.

And with regard to both examples and the guidance in general, I wanted to highlight:

  • How a good mocking framework- RhinoMocks, TypeMock, etc. could alleviate some of the hand-coded mocks used in the Test Projects.
  • Differences between Supervising Controller and Passive View MVP.
  • The two types of View-Presenter Communication shown within the MVP Bundle:
    • View handles the events and passes requests to Presenter.
    • View publishes events and Presenter subscribes to those events.

 

If you watch the MVP Bundle Screencast and are looking for additional guidance on using MVP with the Web Client Software Factory, I recommend watching a previous screencast which dives into MVP via the WCSF in more detail:

View-Presenter Pattern in Web Client Software Factory Screencast

If you are in the Tampa, Florida area on January 31, 2008 and have a whole day to spare, don't forget the Day of Patterns & Practices Event that will be discussing:

  • Web Client Software Factory v2.0 Guidance Bundles
  • Service Factory: Modeling Edition
  • TDD and Model-View-Presenter
  • ASP.NET MVC Framework

Although we probably won't cover the MVP Bundle directly, there will be plenty of talk throughout the day regarding Model-View-Presenter and Model-View-Controller Design Patterns. Pizza is provided for lunch and their is plenty of time after the event to discuss patterns & practices over your favorite beverage :)

I hope you enjoy the screencast and I apologize for it being a whopping 29 minutes. It won't happen again :)

 


Posted Tue, Dec 18 2007 8:30 PM by David Hayden

[Advertisement]

Comments

Christopher Steen wrote Link Listing - December 18, 2007
on Wed, Dec 19 2007 8:19 AM

Link Listing - December 18, 2007

Christopher Steen wrote Link Listing - December 18, 2007
on Wed, Dec 19 2007 8:19 AM

Code Camps Swag Scrooges [Via: Steve ] Philly Code Camp Registration Open [Via: Chip Lemmon ] Link...

DotNetKicks.com wrote MVP Bundle Screencast - Model-View-Presenter with and without WCSF
on Fri, Dec 21 2007 8:16 AM

You've been kicked (a good thing) - Trackback from DotNetKicks.com

Devlicio.us