Freigeben über


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.

image

 

Process

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.

Comments

  • Anonymous
    June 15, 2010
    Looks solid, guys ... as always, appreciate the fast releases and responsiveness to the community. I believe both the MEF and MVVM support will be key for the community so it's great to see some guidance around these two areas.
  • Anonymous
    June 16, 2010
    Thanks Jeremy. Please pass the feedback on as we are only as good as the feedback we receive.
  • Anonymous
    July 14, 2010
    The comment has been removed
  • Anonymous
    July 19, 2010
    Lee,Which examples did you look at?TDD is a core tenant that we follow at pattners & practices. The RI are developed with TDD. Many of the QuickStarts are not created TDD because it can make the code complex to understand. Let me know if there are specific cases where you think should use TDD but have not.
  • Anonymous
    July 21, 2010
    Great stuff.  I want to clarify, Phase 1 as you've described above will be in a final state ready for Production use this month?  If so can you verify if that's still on schedule?Thanks.
  • Anonymous
    July 22, 2010
    Frosty,We are in the final stages of Phase 1 right now which means finishing the documentation. We plan to complete the work by the end of the month or ealry next month. This is a Codeplex release which means it may change before we go final on MSDN for the entire release. Some of modularity bits might change when we look at UI composition and Event Aggregator with MEF for example. We will look at this in Phase 2.blaine