Freigeben über


Prism and MEF – what’s the story?

We get questions ranging from “will next version of Prism use MEF?”, “How can we use MEF in the current version of Prism?” to “would MEF replace Prism?”. My colleague David Hill just did a blog post that addresses many of these questions. Check it out here

Excerpts from his blog post:

First of all, it’s important to note that Prism and MEF are very much complementary technologies. MEF allows you to create extensible applications by providing support for automatic component discovery and composition. It does not focus on application- or UI-level patterns or on any specific UI technology. Prism on the other hand provides support for creating modular composite client applications built on Silverlight and/or WPF. As such it supports a wide range of patterns including the higher level UI patterns and concepts that are need to support composite clients – such as modularity, module deployment, loosely coupled communication, commanding, and separated presentation patterns such as Model-View-ViewModel, etc.

There is clearly some overlap between MEF and Prism (since modular composite client applications are by definition extensible!!) but MEF by itself in no way replaces or obviates the need for Prism – they are each targeted at different parts of the overall puzzle. MEF in fact is fantastic news for Prism, because it means that we can now leverage core capabilities that are provided by the .NET Framework, whereas in the past we’ve had to build those capabilities as part of Prism itself.

Related links:

Managed Extensibility Framework Overview

p&p Composite Client Application Guidance (aka Prism)

Happy Reading!