In the first part of this series, I demonstrated a very simple project that used MVVM (Model-View-ViewModel) along with the Managed Extensibility Framework to produce a simple screen that toggled between a square and a circle.
In this next video, I am re-designing the original project. This video starts with the original solution, but then I rework the code, using metadata, to turn the shapes into plugins. I duplicate the original effort with the new design (using a combobox instead of a checkbox because now we can support 1 ... n plugins) and then show how easy it is to add a new plugin with the architecture.
Download the source code for this project.
Here is the final application:


Thanks for these great tutorials Jeremy. I've just started looking at MEF and MVVM and you've done an excellent job of showing how to bring them together. Really looking forward to part 3.
ReplyDeleteYou're welcome! I'm looking forward to filming it. :)
ReplyDeleteJeremy - great stuff. Very helpful in trying to get comfortable using MEF with MVVM. Any idea when you'll have Part 3 of the series available for viewing? Thanks again
ReplyDeleteDave
Hi, Dave. Thanks for the feedback! I don't have an exact date. As part of the MEF Contrib team, I'm responsible for helping with quickstart projects and videos, so while it may not continue this specifics series, I will be recording new examples in the weeks and months to come. Stay tuned!
ReplyDeleteGreat post Jeremy. I am learning how to use MEF and MVVM together and this is a great demo showing how that can be done...
ReplyDeleteWhen are we getting a part 3 ??? This is a great series!
ReplyDeleteSoon! Thanks for the positive feedback. I'm prepping for a few talks coming up (one in Atlanta, one in Knoxville for Codestock) and also working on MefContrib documentation, so eventually I will create the time to get it done ... might overlap with some of what I'm doing for the MefContrib project, as it will include video quickstarts like this.
ReplyDeleteDo you plan on continuing this video series?
ReplyDeleteAbsolutely, but via my work with the MefContrib team:
ReplyDeletehttp://mefcontrib.codeplex.com/
Couldn't really follow mvvm and mef until i saw your videos. Excellent tutorial.
ReplyDeletethanks,
Alex
oh and couldn't wait for the part 3... :-)
ReplyDelete--
Alex
Jeremy where is part 3? show more how mef can be integrated with silverlight
ReplyDeleteJeremy, you have done an amazing job! Hands down this is the best explanation of MEF I've found anywhere.
ReplyDeleteVideo does not work....on any part of this post :(
ReplyDeleteHi Jeremy, have you decided not to do Part 3 in this series, this has helped me understand MEF better than the MEF documentation.
ReplyDeleteHi jeremy i tried opening the project with SL4 and VS2010, it doesn't open in that , also with the same flow it throws error when in App.xaml CompositionInitializer.SatisfyImports(this) with below error
ReplyDeleteCannot set import 'SingleXAPSilverlight.App.MainView (ContractName="SingleXAPSilverlight.MainPage")' on part 'SingleXAPSilverlight.App'.
Element: SingleXAPSilverlight.App.MainView (ContractName="SingleXAPSilverlight.MainPage") --> SingleXAPSilverlight.App