Share via


10-4 Episode 26: Creating Extensible Applications with MEF

In the latest episode of the Visual Studio 10-4 show, Jason takes a look at a new library in .NET Framework 4 and how it helps developers write applications that are more extensible and easier to maintain than before.

 

Get Microsoft Silverlight

 

The Managed Extensibility Framework (MEF) presents a simple solution for the runtime extensibility problem. Until now, any application that wanted to support a plugin model needed to create its own infrastructure from scratch. Those plugins would often be application-specific and could not be reused across multiple implementations.

  • 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 additonal metadata which facilitates rich querying and filtering

For more information on the Managed Extensibility Framework, make sure to check out its home on Codeplex: https://www.codeplex.com/mef.