10-4 Episode 32: MEF Preview 7

Download this episode

Download Video

Description

In this episode of 10-4, we revisit the Managed Extensibility Framework and take a look at all the new improvements made in the latest available release, Preview 7.

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

Resources from this episode:
- [Nicholas Blumhardt] Analyze MEF Assemblies from the Command Line
- [Laurent Bugnion] MVVM Light Toolkit

For more 10-4 episodes, be sure to visit:
https://channel9.msdn.com/shows/10-4

10-4! Over and out!

Embed

Format

Available formats for this video:

Actual format may change based on video formats available and browser capability.

    The Discussion

    • User profile image
      aL_

      cool ive been waiting for a MEF update for a long time (indeed hardcore developer content has been pretty thin lately.....)

       

      im kinda sad to hear that .net gets pushed aside in favor of silverlight once again.. it seems like .net desktop is always getting pushed aside Sad hopefully all these stuff that "eventually will make it into .net desktop" will actually make it in .net desktop in a timely fashion..

      it also seems like the shipped version of MEF in .net 4 will already be outdated before it even ships Sad

       

      hopefully im wrong about this but microsoft needs to show that they care about industrial devs that have to plan and cant always use beta code..

       

      sorry for beeing so negative, mef is awsome Smiley 

    • User profile image
      wisnia

      Great episode Smiley

      Love listening to Glenn because he always speaks a LOT of code, not some PPTX non-sense and he explains everything very clearly Smiley

      Thanks again for the tour about MEF in Poland Glenn!

    • User profile image
      bondsbw

      I may have missed something at some point, but when did the ability to hook into another IoC container get added?  This has been a hot topic for MEF, and I didn't see anything about it in the release notes.

       

      Regardless, does this mean that I can use (for instance) Windsor as the back-end container for MEF, and it would give Windsor the ability to discover plugins and compose based on the Import and Export attributes in MEF?  If so, this is great news!  We had just decided to drop MEF in favor of rolling our own plugin discovery with Windsor... maybe we don't have to anymore.

    • User profile image
      adronbh

      I wonder how well Office Excel & Outlook Components will work with this framework?  I'm about to find out!  Smiley  Hooking up a WPF/Silverlight/Office Excel/Outlook 2007 Application real soon.

    • User profile image
      codewiz

      Hi Al

       

      We definitely plan on rolling the new features into the full framework. It's too late in the cycle to do that for .NET 4.0, if we could we definitely would.

       

      Silverlight ships on a different schedule, which opened up the opportunity to add new features like we are doing. For the desktop, we plan to make 3.5/4.0 versions of those features available on Codeplex in the interim.

       

      Thanks

      Glenn

    • User profile image
      codewiz

      Hi Bondsbw

       

      We have supported this for quite a while now. Our container accepts custom ExportProviders which can talk to another source for exports including an IoC container. There's an example out there in the community now that leverages this for integration with Unity. You can find it at mefcontrb.codeplex.com.

       

      You are correct in your understanding. With an EP, you can have MEF parts with Imports that will be provided by an IoC container. We'll be doing a blog post on this at some point. But this post covers the fundamentals: http://codebetter.com/blogs/glenn.block/archive/2008/12/25/using-exportprovider-to-customize-container-behavior-part-i.aspx


      Thanks

      Glenn

    • User profile image
      codewiz

      Thanks Tomasz. I am surprised you want to see any more of my code after the hours upon hours that you saw in Poland Smiley

       

    • User profile image
      codewiz

      Cool, good luck. Let us know how it works out, and blog blog blog Smiley

    • User profile image
      bondsbw

      Thanks Glenn. Smiley

       

      Do you (or anyone) know if there is work on a custom ExportProvider for CommonServiceLocator containers?  I've found this:  http://commonservicelocator.codeplex.com/Wiki/View.aspx?title=MEF%20Adapter.  But it looks to only expose MEF's container as a CSL.

       

      Thanks again!

      Brandon

    • User profile image
      aL_

      im glad to hear that  Smiley

      another question though, how will the released .net4 version relate to upcoming MEF releases? will we not reference  the old versions and just reference the new ones or will you do more addative releases? im just curious Smiley but it would seem a little strange to have an old version just hanging around in the gac, not beeing used

    • User profile image
      codewiz

      Brandon

       

      Good question and timing. Yes, I am planning to put one in contrib. Here's the code if you want it now Smiley

       

      http://codepaste.net/s6w6az

       

      If you look in the sample you will notice a Unity extension as well. The reason is that to use this EP, something has to tell it the available registered types so that it can map them to contract names, as MEF is solely contract based. You'll see the extension invokes a method on the EP.

    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.