PRISM V2.x -> PRISM V4 compatibility?

Topics: Prism v4 - Silverlight 4, Prism v4 - WPF 4
Jun 8, 2010 at 10:48 AM
Edited Jun 8, 2010 at 11:03 AM

Hello everybody,

I am in the process of rewriting my entire smart client framework using PRISM. I am worried about compatibility when it comes to PRISM V4. Can we have some indication that we're not wasting our time right now and that we should all rather wait until August when PRISM V4 comes out?

How much of a change would it have to be to our existing code and infrastructure to upgrade to using PRISM V4?

Considering that PRISM V4 might have a Unity/MEF option, how does it affect all of us using Unity with PRISM V2.x if we would be interested in using MEF in PRISM V4?

Download my implementation of a PRISM Shell for WPF and Silverlight. This project uses Multi-Targeting and the Project Linker to develop simultaniously for WPF and Silverlight. There are no extra modules included, only what you need to start writing your own modules for PRISM.

Once again, I fear breaking changes between PRISM V2.x and PRISM V4. Please confirm that there would be some degree of backwards-compatibility.


Stephan Johnson

Jun 10, 2010 at 7:37 PM

Hi Stephan,

There is no guarantee that Prism v4 will have full backwards compatibility with Prism v2. Although there are no known breaking changes, you might have to make some changes to your code, as the final implementation of new features in Prism v4 are still in progress. However, take into account that you could adopt Prism's capabilities in a progressive way (as explained in this article under the category of subsetatbility).

If you are interested on porting your Prism v2/Unity app to Prism v4/MEF, you should replace the UnityBootstrapper by the MefBootstrapper and replace the usage of Unity in your code (such as Constructor Injection, calls to Register and Resolve methods, etc.) by the MEF elements (such as Import and Export attributes, etc.) in all your modules.

I hope you find this helpful.

Guido Leandro Maliandi

Jun 10, 2010 at 8:50 PM

Hi Guido,

You guys are doing such a great job with PRISM that I could not stop myself from starting my rewrite sooner rather than later. I understand what the article is telling me. Even if there is code to be replaced, I think that it should be fairly easy to replace. I don't think I'll have millions of dependant lines of code by August (I am still correct in my assumption that this was your target date for PRISM v4?) anyway.

By stating that I will have to change the Unity components to Mef components, I assume that there would be no PRISM abstraction layer so that we can choose which code injection mechanism to use. I believe in the survey there was a question regarding the topic?!



Jun 11, 2010 at 5:30 PM

Hi Stephan,

Thanks for the feedback. You are right, currently there are no plans on creating an abstraction layer for Unity/MEF, although Prism will probably stay container agnostic as it is now.

About the release, you can find an estimated date in this blog post.

I hope you find this helpful.

Guido Leandro Maliandi