Prism 4.0 Plan & Drop Available on Codeplex

The team is hard at work on Prism 4.0 which will run on .NET 4.0 and Silverlight 4. We just posted the second drop on Codeplex. We are in the early stages so we really appreciate your feedback – both good and bad. As I previously announced in my blog, Prism 4.0 will focus on:

  • Model-View-ViewModel (MVVM)
  • Modularity with Managed Extensibility Framework (MEF)
  • Navigation
  • Codeplex Issues from the Codeplex Issue Tracker
  • Templates / Code generation

The following logical architecture image highlights in orange the areas that we believe will be added or changed in this release. This is a plan not a commitment so as we learn more and progress through the project, this picture will change.




We plan to post bi-weekly drops to Codeplex as we have done in the past. We will also break the release into two phases. The first phase will be delivered to Codeplex in July and the final phase will be delivered in late September or October. For Phase I, we will focus on Modularity with MEF and MVVM. For Phase II, we will focus on Navigation, Templates / Code Generation, and Codeplex issues that the community voted for. We will also look at how we can use MEF to help with UI Composition in Phase II.


Phase I

Modularity: Formodularity we plan to support MEF and Unity. When you use MEF, we want the code to look “MEFEE” and we want the Unity code to look like it uses Unity. The Modularity QuickStart currently works with MEF. So let us know how well we are doing in making the QuickStart code like MEF. 

The new modularity challenges we plan to in Phase I include:

  • Use MEF to export and discover modules
  • ModuleCatalog updates as MEF discovers Modules
  • Modules downloaded through MEF (DeploymentCatalog)
  • Background download of XAPs with progress displayed (Async event pattern)
  • Handling conflicts between ModuleCatalog (via config) and MEF-based ModuleExport attributes

We will continue to support:

  • Module catalog defined in code
  • Module catalog defined in config
  • Module catalog defined in a directory
  • Module catalog defined in xaml
  • Dependencies between modules
  • Unity

MVVM: For MVVM, we plan to demonstrate 3 scenarios: POCO ViewModel that wraps the Model; Model exposed to the View through a ViewModel; a View and ViewModel that does not have an associated Model. We will demonstrate these scenarios through a QuickStart, a Reference Implementation and documentation. The current drop on Codeplex includes the QuickStart which demonstrates the first scenario - POCO ViewModel that wraps the Model.

Note: The MVVM QuickStart and RI (this will not be the Stock Trader RI) do not use any of the existing Prism libraries which is by design. We want to see how far we can take the guidance on the Microsoft platform. After we finish creating the QuickStart and RI, we will look to see what code if any makes sense to add to the Prism library.

The challenges the current MVVM QuickStart demonstrates include:

  • Hierarchical ViewModel
  • Simple View and ViewModel hookup
  • Notification if properties changed  (Implement INotifyPropertyChanged)
  • Property Validation (Implement INotifyDataErrorInfo)
  • Model Validation
  • UI validation where the model cannot perform the validation (e.g. input parsing errors)
  • Properties in the ViewModel that do not belong in the Model
  • Unit tests for ViewModel and Model
  • Transitions/Animations triggered by the ViewModel
  • Use of Blend Behaviors (Commanding, Data Template Selection, Binding, Validation)

We anticipate the MVVM RI  will demonstrate some of the following challenges:

  • View / View Model hookup using MEF
  • Model created using RIA Services
  • Model exposed to View via property on ViewModel
  • Manage context between views
  • View is instantiated first
  • ViewModel is instantiated first

Phase II

Once we get closer to completing Phase I, we will create a more complete definition for Phase II. In Phase II, we will update the Stock Trader RI to demonstrate MVVM throughout the RI and then address navigation, templates, and issued identified on Codeplex. Additionally, we will look at other areas where it makes sense to use MEF such as UI Composition.