Plan for Prism for .NET 4.5

The patterns & practices team is working on an update to Prism for WPF to support .NET 4.5. We plan to complete the release in February. Francis just posted our first drop to CodePlex. So go check it out and give us your feedback.

This project was just released. See the blog post announcement.

Scope

Prism library updates

The major theme for the release is to move classes to Portable Class Library (PCL) and to address some of the requested CodePlex issues. In Prism for the Windows Runtime we moved the Event Aggregator to PCL. For this release we will move classes that support MVVM to PCL. For the classes that are moved to PCL, we will make the WPF versions obsolete.

Going forward you will see us put as much into PCL as is appropriate and reasonable.

Here is what we are doing for Prism in this release:

  • ViewModel Locator: migrate ViewModelLocator from Prism for Windows Runtime to be a Portable Class Library and use it in Prism for WPF.
  • BindableBase: migrate BindableBase from Prism for Windows Runtime to a Portable Class Library and use it in Prism for WPF. There is a request to add CallerMemberName to NotificationObject. We decided to port BindableBase from Prism for Windows Runtime to PCL as it already supports CallerMemberName. This means we will make NotificationObject obsolete in this version.
  • Navigation: allow a dev to pass an object as a navigation parameter. This is a CodePlex request.
  • InteractionRequest: migrate InteractionRequest to WPF. This is a CodePlex request.
  • DelegateCommand: migrate DelegateCommand to a Portable Class Library. In a future release, Prism for the Windows Runtime will use the PCL version of the DelegateCommand.

Quickstarts

  • Basic MVVM Quickstart.
    • Create WPF version.
    • Add ViewModel locator.
    • Demonstrate how to construct parent-child Views and ViewModels.
    • Demonstrate how to communicate between parent and child.
  • State-based Navigation Quickstart.
    • Create WPF version.
  • UI Composition Quickstart.
    • Create WPF version
  • View-Switching Navigation
    • Create WPF version

Drops & Release

Francis Cheung posted a drop today to CodePlex. Once we complete the release we will create NuGet packages and publish the source code on the Microsoft download center.

In this Drop

  • Prism
    • ViewModel Locator and Bindable Base ported to PCL
      • NotificationObject is marked obsolete
    • Interaction Request working for WPF
    • Using .NET 4.5.1 and latest version of Unity and the Common Service Locator
    • Navigation passes an object and a string
    • ErrorsContainer, NotificationObject, CompositePresentionEvent marked as obsolete.
  • Basic MVVM QuickStart using Prism ViewModel Locator.
    • The ViewModel Locator uses a convention based approach to wire views and view models. In our XAML we tell the ViewModelLocator to AutoWire the view and the view model.

prism:ViewModelLocator.AutoWireViewModel="true"

    • The convention assumes:
      • View models are in the same assembly as the view types
      • View models are in a .ViewModels child namespace
      • Views are in a .Views child namespace,
      • View model names correspond with view names and end with "ViewModel".
      • For more information on how the ViewModel Locator works see the Prism for Windows Runtime documentation. We will provide documentation on how to modify the default convention.
  • Prism, Stock Trader reference implementation, and Quickstarts updated to use BindableBase (Prism.Core) and PubSubEvent (Prism.PubSubEvents).
  • CodePlex requests resolved
    • 10110 - Unity not compatible with UnityExtensions
    • 9439 - Navigation to an existing view
    • 8121 - Prism ContentControl Region RequestNavigate - View already exists in region
    • 9439 - [MEF] Navigation to an existing View
    • 9118 - Extract Core Application Functionality to Core Assembly (Prism.Core)
    • 9107 - NuGet packaging

Check out the drop and let us know your thought.