Having talked about the System.AddIn and the MAF architecture in the past few days, I thought it is time to look at the Managed Extensibility Framework (MEF) which is now part of the .NET Framework 4.0. Even though it was possible to create AddIns using framework support, the process was never been easier as that of MEF. MAF/System.AddIn and MEF serves different purposes, although these can be integrated to avail both of their features.
Well, that’s the high level summary, I will to go through MEF basics and revisit the comparison between MAF and MEF. You can get the MEF framework libraries from:
By definition “The Managed Extensibility Framework (or MEF for short) simplifies the creation of extensible applications. MEF offers discovery and composition capabilities that you can leverage to load application extensions “
- MEF provides a standard way for the host application to expose itself and consume external extensions. Extensions, by their nature, can be reused amongst different applications. However, an extension could still be implemented in a way that is application-specific. Extensions themselves can depend on one another and MEF will make sure they are wired together in the correct order (another thing you won’t have to worry about).
- MEF offers a set of discovery approaches for your application to locate and load available extensions.
- MEF allows tagging extensions with additional metadata which facilitates rich querying and filtering
For more information visit MEF on CodePlex
We can look at the implementation and architecture of MEF and the elements involved in extensibility support in Part 2