skip to the main content area of this page
Patterns and Practices

 

MVP Bundle Screencast - WCSF v2.0 Model View Presenter Design Pattern


MVP Bundle

MVP Bundle in WCSF v2.0

The MVP Bundle in WCSF v2.0 provides guidance on the Model View Presenter Design Pattern used with and without the Web Client Software Factory. This MVP Bundle Screencast discusses the guidance bundle in-depth by discussing the pros and cons of both MVP quickstart examples.

The screencast highlights:

  • WCSF Add View (w/Presenter) Recipe and Dependency Injection.
  • Various ways to provide View-Presenter Communication.
  • Rhino Mocks as a Mock Framework.
  • Castle Windsor, Spring.NET, and StructureMap DI Tools.
  • Supervising Controller and Passive View MVP.

Download ( 73MB, 29min AVI File )



MVP Bundle Screencast Show Notes

The screencast is twice as long as I would like, but I went into a lot more detail in terms of what the Web Client Software Factory and Composite Web Application Block provide in terms of automation and dependency injection. I also dive into the changes in dependency injection from WCSF v1.0 to 2.0, going into Reflector to show the differences in the underlying assemblies.

I also discuss two forms of View-Presenter Communication that are shown in the MVP Bundle Quickstarts that may not be noticed. In one part of the QuickStart the View handles the events and delegates calls to the Presenter via a method call.

 

protected void CustomersGridView_
        SelectedIndexChanged(object sender, EventArgs e)
{
    _presenter.OnSelectedIndexChanged();
}

 

In another part of the QuickStart, the View publishes events that the Presenter Class much subscribe to:

 

protected void OnEditClicked(EventArgs e) {
    if (EditClicked != null)
    {
        EditClicked(this, e);
    }
}

 

I explain the new MasterPage, Page, and UserControl Base Classes as well as the ObjectContainerDataSource Control which offers wonderful MVP Functionality for use with UI controls that can take advantage of a DataSource Control.

I also dive into various dependency injection tools ( Windsor, Spring.NET, StructureMap) as well as mock frameworks ( RhinoMocks, TypeMock, etc. ) that can help with testing and providing dependency injection services when not using the Web Client Software Factory.

Included is a brief discussion of the differences between Passive View and Supervising Controller Model View Presenter Design Patterns and a few resources on the web for more information.

I hope you enjoy the screencast.


Tags: MVPBundle, ModelViewPresenter, DependencyInjection, GuidanceBundles, ObjectContainerDataSource