MEF & Silverlight 4 Beta - Part 6, Locating Defaults & ExportProviders

Play MEF & Silverlight 4 Beta - Part 6, Locating Defaults & ExportProviders
Sign in to queue


Part 6 of a series of screencasts looking at the new Managed Extensibility Framework (MEF) in the Silverlight 4 beta.

MEF is a framework that simplifies the design of extensible applications and components. It can flexibly and dynamically discover a set of loosely coupled components and analyse their dependencies in order to compose them together at run time.

In this screencast we take a look at how we can provide defaults in a CompositionContainer such that an application can be sure that it has an implementation of a plug-in if no additional plug-in is discovered by MEF. This leads to a discussion about ExportProviders and how they provide an extensibility point for MEF.

Tips for viewing:

  • Each video in this series has a 3.5 minute standard introductory "header" on it so once you have seen that header you may like to skip it on subsequent videos
  • For the time pressured - I find that I speak so slowly that you can speed me up to approximately 1.5-2.0 times normal speed and still listen comfortably.

I'm working to get together a Live Meeting in early 2010 with people from the MEF team in order that people can chat more about MEF in Silverlight. Stay tuned.

The next screencast in this series is ( not yet available ). "That's all folks!" but subscribe to the feed above for notifications when more come online...



Right click to download this episode

The Discussion

  • User profile image

    Nice video. I'm still a bit fuzzy on why it's necessary to set "CatalogExportProvider.SourceProvider" and what it should point to though.


    I couldn't find any real use of this property during a quick look at the MEF source, except that exceptions are thrown if it is not set. The root "System.ComponentModel.Composition.Hosting.ExportProvider" abstract class doesn't even have this property.

  • User profile image

    Great job with this video series Mike ...  I like this format of doing a series of videos each one building on the next.  THANKS, I've definitely learned a lot.

  • User profile image

    @wcoenen source provider is what allows a catalog to talk back to the rest of the world to satify it's imports.  It is not part of ExportProvider because not all EPs need to do that loop back. CatalogExportProvider queries back through the source provider property. For example imagine the container had an ILogger instance directly added to it, and the catalog had an OrderProcessor part which imports it. In order for that part to be created, the catalog needs to grab the ILogger which it gets through the source provider.

  • User profile image

    Nice video. Any idea on putting some videos of using PRISM + MEF with MVVM ? I would really like to see on of those.

  • User profile image

    It's on my list of things to think about, yes Smiley



Add Your 2 Cents