Are you a WPF, Silverlight or Windows Phone developer and use Microsoft's Patterns and Practices library to build your applications? If you are, then you might want to know that Microsoft's Patterns and Practices team have just released Prism 5.0. All the applications built using the previous versions of Prism are now broken. So, in this article, I'll be discussing the new assemblies, new objects and deprecated objects that can/can't be used with Prism 4.1 and Prism 5.0.
Downloading Prism 5.0
Prism 5.0 can be downloaded and installed either from the Patterns and Practices site having the URL http://compositewpf.codeplex.com/ or by using the Nugget package inside Visual Studio. The specified link also discusses all the changes that are part of Prism 5.0
Supported Platforms
Let's have a quick look at the supported platforms of Prism 5.0. When working with previous versions of Prism (in other words 4.1), one was able to create applications like WPF (.Net 4.0), Silverlight 5 and Windows Phone (7.5). The point to note here is, Prism 5.0 only supports WPF (.Net 4.5).
In other words, if your application is written in Silverlight or Windows Phone and you are planning to upgrade to Prism 5.0, then it's not going to work. In this case, either you need to use some tool and make your application a WPF application (if possible) or simply continue with the existing version of Prism.
Assembly Changes
This section discusses about all the assembly-related changes that Prism 5.0 introduces. Please note, in the following table all the assemblies are prefixed with Microsoft.Practices:
Note that in the preceding table, the assembly named Microsoft.Practices.Prism in Prism 4.1 is no longer called Microsoft.Practices.Prism in Prism 5.0. Now this assembly is renamed to Prism.Composition.
There is no change in Prism.Interactivity, ServiceLocation, Prism.UnityExtensions and Prism.MefExtensions front.
This Prism.Composition takes dependency on another new assembly called Prism.SharedInterfaces, which is a Portable Class Library (PCL).
On the MVVM front, there are two more additions. One is Prism.MVVM that is again a PCL and shares a common MVVM functionality across Windows Store Apps and Windows Presentation Foundation applications. Now to get around a few limitations and some necessary enhancements on WPF, a separate assembly is created having a name the Prism.MVVM.Desktop, that is specifically meant to be used on the desktop.
One more addition is Prism.PubSubEvents. This is an event aggregator. So, the event aggregator is called out of Prism and has been kept into its own PCL library in Prism 5.0.
Deprecated Objects
Deprecated objects are the objects that are still in assemblies, but we just don't want to use them anymore and if you are currently using them, then you need to move them to a different object instance. The following is the list of such objects:
Objects moved to a new location
There are a few objects that provide the new home in Prism 5.0. If you are using any of the following specified objects, then you need to re-reference your assemblies with the new ones. Apart from assemblies, the namespace is also changed. Please note, the following changes are the breaking changes.
Removed Objects
There are a few objects in Prism 4.1 that are completely removed from Prism 5.0. This section discusses the objects that are completely gone. This is again considered to be breaking changes.
Apart from all these changes, a few changes are made to Quick Starts and help files also.