tags:

views:

242

answers:

2

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!

+4  A: 

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...

markt
A: 

This article explains how to use MEF in more of a "line of business" type application (even if it's a pinball game, it's based on an IDE layout). Most of the other introductions I've seen so far are a bit more contrived.

Scott Whitlock
@priyanka: Ok, I changed it in the original question then. :)
Scott Whitlock