Partager via


Custom Programming Models for MEF (Provider Model Contrib)

The MEF composition engine operates on (composes) abstractions called ComposableParts. By default, parts are implemented as simple .NET classes annotated with MEF attributes (ExportAttribute and ImportAttribute). But, we envision that some parts will be implemented through variety of different mechanisms. For example, parts can be .NET types annotated with external files, DLR objects, XAML files, etc. We call such alternative means of specifying parts “custom programming models.”

In v1 of MEF, we focused on getting the default programming model super easy to use (most MEF users need to only understand a handful of types) and getting the ComposablePart abstractions right (making it possible to create custom programming models). We did not focus on making it easy to create custom programming models (quite advanced scenario).

Andreas stepped in and filled in that hole. He created a MEF contrib project which is a set of helper libraries that make it quite easy to create custom programming models. For all those who like to play around with internals of technologies like MEF, I recommend looking at the library.

Comments

  • Anonymous
    March 03, 2009
    Thanks for the kind words Krzysztof! For anyone that would like to follow me on twitter, where I often bring up MEF, you can follow me on the TheCodeJunkie account Also I'd LOVE for anyone who checks it out to leave a comment in the discussion section of the MEF Contrib project... shares your thoughs, experience and suggestions on more features!

  • Anonymous
    March 03, 2009
    PingBack from http://www.clickandsolve.com/?p=17428

  • Anonymous
    March 03, 2009
    When MEF is shipped is the Plugin Library in the .Net Framework officially depreceated?

  • Anonymous
    March 04, 2009
    Mike, do you mean System.AddIn namesapce? If yes, we don't have plans to deprecate it. It's complementarey, not an alternative, to MEF.

  • Anonymous
    March 04, 2009
    Thank you for submitting this cool story - Trackback from DotNetShoutout