Is PRISM going to be deprecated in favor of MEF?

Topics: Prism v4 - WPF 4
Jan 10, 2013 at 7:58 PM

I need to write a composite desktop application and I am at the stage of investigating technologies to use.

I have been doing some research online and found that MEF is part of .NET framework now meanwhile PRISM is not.

I would like to better understand if Microsoft is planning on stopping supporting/deprecating PRISM in favor of extending MEF to support UI composition classes.


Jan 10, 2013 at 8:43 PM
Edited Jan 11, 2013 at 4:29 PM


I am not aware if there are any plans to "extend" MEF, but take into account that MEF and Prism addresses very different goals.

Based on my understanding, MEF is a composition layer, which provides plugin-like capabilities to compose and populate classes in the application. Due to this, MEF is often used as a dependency injection container allowing to loosely-couple different classes (like views and view model.)

Prism instead address a wider scope. It provides a framework on which you can develop an application separated in logic decoupled modules, along side with several services which allows you to manage and communicate modules between each other, as well as providing support for dynamical UI composition. Examples of such services are the EventAggregator (for sub-pub patterns), RegionManager (for decoupled UI composition), ModuleManager (to manage the charge of decoupled modules), among many others.

As you can see, Prism and MEF address very different scenarios. What's more, Prism does not provide dependency injection capabilities on its own and requires an external container in order to work. As out of the box, Prism supports both MEF and Unity as dependency injection containers, however it can be configured to use any other third party container. Hence, MEF and Prism could be seen as complementary components.


Damian Cherubini

Jan 10, 2013 at 8:58 PM

Thanks Damian for your prompt response. I understand the difference between MEF and PRISM. My question was more based on the direction Microsoft is going to take regarding composition frameworks as I see that MEF is gaining a whole lot of support. One direction could be to include MEF based PRISM libraries as part of MEF but it could also be the case that they decide to use something else and it gets deprecated.

Anyways your first phrase already answers that question, too.

I guess I should find out more in MEF discussion forums :)