Managed Extensibility Framework Explained

Managed Extensibility Framework
Developer:Microsoft
Latest Release Version:V1 in .NET Framework 4.0
Latest Preview Version:V2 Preview 5
Programming Language:.NET Languages
Operating System:Windows
Platform:.NET Framework
Genre:Web application framework
License:MIT License[1]

Managed Extensibility Framework (MEF) is a component of .NET Framework 4.0 aiming to create lightweight, extensible applications. It aims to allow .NET application developers to discover and use extensions with no configuration required. It also aims to let extension developers encapsulate code easily and avoid fragile hard dependencies. Furthermore, it aims to allow extensions to be reused across applications.[2] MEF was introduced as a part of .NET 4.0[3] and Silverlight 4. It was later improved with the release of .NET 4.5 by adding support for generic types and the introduction of a convention-based extension model.[4]

Overview

MEF aims to solve the runtime extensibility problem. Without MEF, any application that wants to support a plugin model needs to create its own infrastructure from scratch. Those plugins will often be application-specific and cannot be reused across multiple implementations.

Design

Roughly speaking, MEF's core consists of a catalog and a CompositionContainer. A catalog is responsible for discovering extensions and the container coordinates creation and satisfies dependencies.

Further reading

External links

Notes and References

  1. Web site: MEF. . 15 October 2021.
  2. Web site: How to work with the Managed Extensibility Framework in C#. Kanjilal. Joydip. 7 July 2016. InfoWorld. 25 June 2022.
  3. Web site: What's New in VS2010 and .Net 4?. Pronschinske. Mitch. 12 April 2010. DZone. 25 June 2022.
  4. Web site: Managed Extensibility Framework Improvements in .NET 4.5. Vogel. Eric. 12 February 2010. VisualStudio Magazine. 25 June 2022.