Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the Managed Extensibility Framework (MEF)? [closed]

Tags:

definition

mef

I googled and got only a few articles about MEF. Would someone please explain in brief:

  • What is the Manage Extensibility Framework?
  • For what purpose is it needed?
  • How can I start working with it?

Any step by step guidance will be helpful, thanks!

like image 537
priyanka.bangalore Avatar asked Feb 18 '10 04:02

priyanka.bangalore


People also ask

Is MEF supported in .NET core?

For those who don't know, the Managed Extensibility Framework (MEF) is alive and well, and has been ported to . NET Core as System.

Is MEF dependency injection framework?

This article shows how to use the built-in dependency injection. The Managed Extensibility Framework (MEF) is a built-in set of elements that allows you to “export” and “import” objects across projects that allows you to not rely on hard dependencies.


1 Answers

MEF allows you to design a system that can be extended.

In my experience, you can design interfaces, create libraries that have implementations of those interfaces, and load them dynamically at runtime.. You can also determine how those extensions should be loaded - in the same application domain, or a new one, etc. You can point it at a directory and tell it to get all of the implementations of a certain interface, and load those to use in your application..

So, because your application doesn't need to know all of its features up front and can load them dynamically, you can say it is "extensible"..

Alternatively, there is also MAF, the Managed Add-in Framework, or the System.AddIn namespace in .NET. This has some overlap, but is more targeted toward an Add-In or Plug-in model. It has features for managing versioning, and handling backward compatibility between hosts and add-ins each with different versions of the interface.

To get started with MEF, I think the best place is probably here : http://www.codeplex.com/MEF
There is a lot of information there on getting started, documentation, and even a forum...

like image 170
markt Avatar answered Nov 23 '22 18:11

markt