#altnetseattle – MEF, What is it?

I dived into the MEF session with Glenn Block, Sourabh Mathur, Brian Henderson, and others.  Glenn covered the basic architectural ideas of MEF and then dived into a few examples.

  • Is a framework around decoupling components.
  • Built around the idea of discoverable type systems.
  • Traditional extensibility mechanisms have a host and the respective extensions, commonly linking these two aspects with a form of registration.
  • MEF removes the need for the registration part of the architecture and uses a contract.
  • At some point with MEF you get down to parts, which removes even the complexity of a host or extensions, but a truly evolvable architecture based on natural growth of parts.
  • Also referred to as the framework that removes the “new” keyword.
  • The idea is that parts pull together other parts that they need.  Between each part is a contract.
  • Each part has imports or exports for the parts it needs or the things it offers.

If one checks out the MEF Codeplex Site you will find a host of additional information.  The framework download also has some decent examples that help one get kick started.