10-4 Episode 26: Creating Extensible Applications with the Managed Extensibility Framework
- Posted: Jul 13, 2009 at 11:24 AM
- 68,259 Views
- 13 Comments
Download
How do I download the videos?
- To download, right click the file type you would like and pick “Save target as…” or “Save link as…”
Why should I download videos from Channel9?
- It's an easy way to save the videos you like locally.
- You can save the videos in order to watch them offline.
- If all you want is to hear the audio, you can download the MP3!
Which version should I choose?
- If you want to view the video on your PC, Xbox or Media Center, download the High Quality WMV file (this is the highest quality version we have available).
- If you'd like a lower bitrate version, to reduce the download time or cost, then choose the Medium Quality WMV file.
- If you have a Zune, WP7, iPhone, iPad, or iPod device, choose the low or medium MP4 file.
- If you just want to hear the audio of the video, choose the MP3 file.
Right click “Save as…”
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:
http://channel9.msdn.com/shows/10-4
10-4! Over and out!
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.
Follow the Discussion
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.
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?
Remco.
It was in the post comments... http://www.codeplex.com/mef
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]
System.AddIn
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.
Thanks.
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!
Thanks,
Excellent. Simple and cool stuff to use in the real world.
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.
HTH,
Benjy
Favorite part:
"Hey are you a plumber? can you satisfy my needs?"
I LOL'd
Great video, too bad the quality of the video made it imposible for me to read the code.
Remove this comment
Remove this thread
close