Loading user information from Channel 9

Something went wrong getting user information from Channel 9

Latest Achievement:

Loading user information from MSDN

Something went wrong getting user information from MSDN

Visual Studio Achievements

Latest Achievement:

Loading Visual Studio Achievements

Something went wrong getting the Visual Studio Achievements

10-4 Episode 26: Creating Extensible Applications with the Managed Extensibility Framework

24 minutes, 21 seconds


Right click “Save as…”

  • WMV (WMV Video)
  • MP3 (Audio only)
  • Low Quality MP4 (approx. 500-800kbps)

In this episode of 10-4, we take a look at a new library in .NET Framework 4 and how it helps developers write applications that are more extensible and easier to maintain than before.

For more information on the Managed Extensibility Framework, make sure to check out its home on Codeplex: http://www.codeplex.com/mef.

Source code for demo: http://cid-1b51ad25aad8fc86.skydrive.live.com/self.aspx/.Public/ManagedExtensibilityFramework.zip

For more 10-4 episodes, be sure to visit:

10-4! Over and out!


Follow the discussion

  • Oops, something didn't work.

    Getting subscription
    Subscribe to this conversation
  • Joshua RossJoshRoss Drinking Ovaltine since 2004

    Nice intro!  I had a question, and I tried looking around the CodePlex documentation first, and did not find the answer.  

    This is more of a problem with my documentation reading skills than the authors document writing ability.

    Anyways, back to the question, if I have two or more equivalent exports, that have their imports satisfied, how is the import resolved? First in wins?  I think it has something to do with the catalog.

  • Remco RosRemco Ros .Net developer

    Very nice, especially the part about the NetworkCatalog.

    So you mention that the source is (will be?) available online. But I cannot find a link or attachment?



  • Joshua RossJoshRoss Drinking Ovaltine since 2004

    It was in the post comments... http://www.codeplex.com/mef

  • Remco RosRemco Ros .Net developer

    That's the MEF site. I mean the source from this presentation/example application. (or is this included in MEF Samples?)

  • Sorry for the delay! The code can be found at http://cid-1b51ad25aad8fc86.skydrive.live.com/self.aspx/.Public/ManagedExtensibilityFramework.zip


    Please let me know if that doesn't work!

  • In that situation, we will throw an error because we were expecting to only find one, and we found two. This is the only real "deterministic" way to behave for us.

  • [Obsolete]



  • Very good explanation of MEF. I was looking into Spring.Net. How is MEF compared to Spring. Is it configurable using XML files or is it done through code.


    Why not Spring.Net?


    Just want to hear your take on it; I'm new to Dependency Injection.



  • Omg, this is very cool.. great episode..


    I was wondering if there are any performance implication when linking dependencies to all objects?

    Also, if you can talk more on further episodes about what other features like this will come in .net framework 4 that help us follow other best practices, patterns or SOLID principles easily.


    Again, great job!



  • Excellent. Simple and cool stuff to use in the real world.

  • Santosh Benjaminsantosh_b Benjy

    Spring is an IoC container while MEF is for plugins. An IoC is used when you know your dependencies at design time and typically deals with "one" dependency (for that area of the app) while MEF deals with many.


    For example, with IoC, at design/debug time you may inject a simple console logger for your app or even a mock logger while at production/runtime you will replace it with a proper logger that writes to a file or database but with MEF at runtime you are looking to discover "all loggers" that are available and call them (of course you can just pick up a single logger using the catalog) so your output can be piped to many.


    You could use MEF to wire dependencies like an IoC but it is not meant for or optimized for such behavior. MEF also has advantages with the way stuff is exported and imported in that it is not tied to types which means that your app can be opened up to plugins written in dynamically typed languages.




  • Favorite part:


    "Hey are you a plumber? can you satisfy my needs?"


    I LOL'd

  • Mike CrystalMike Crystal

    Great video, too bad the quality of the video made it imposible for me to read the code.

Remove this comment

Remove this thread


Comments closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.