Build Your Own MVVM Framework
You've heard a lot about Model-View-ViewModel (MVVM), but you've struggled to see how it can help you in your day-to-day work. Or, you're experienced at implementing MVVM, but looking for some ways to maximize your investment in this methodology. In this talk, we build a simple MVVM framework by iteratively identifying pain points in our UI development and eliminating them with simple solutions. You'll walk away with code, but more importantly with an understanding of how to apply some simple ideas to improve productivity with MVVM in your own projects.

20 Comments
said
Mar 13 2010
Please note that this talk presupposes knowledge of either WPF or Silverlight and a grasp of the basic MVVM pattern. If you are new to MVVM, let me encourage you to attend Laurent Bugnion’s talk “Understanding the Model-View-ViewModel Pattern,” conveniently scheduled just before me at 2:00pm in Lagoon F.
bit bonk said
Mar 16 2010
Where is the source code for this demo? Any chance we can get it?
said
Mar 16 2010
You can get the code on my blog, here: http://devlicio.us/blogs/rob_eisenberg/archive/2010/03/16/build-your-own-mvvm-framework-is-online.aspx
Santos Ray Victorero, II said
Mar 17 2010
Rob,
Very nice & interesting presentation!
Santos
samcov said
Mar 17 2010
Rob, this was a very nice presentation, but the coroutine stuff was totally off the hook!!!
Coroutines were well worth the price of admission.
Jacek Ciereszko said
Mar 17 2010
Very very nice. Thank you! :)
Milosz Skalecki said
Mar 20 2010
Rob,
I have been playing with Caliburn for few days now but missed the coroutines - it really simplifies the async method chains. Thanks a lot!
Ilkay Benian said
Mar 23 2010
Very creative way of using yield and async programming. I actually designed a similar sort of library for a client to do parallel back end calls. You start parallel tasks which are put into what we call a future-group and then start waiting on an enumerator. The results are yielded as they become available, in order or out-of order depending on your choice. So you just do a foreach() on the futuregroup. The asynchronous programming details are pretty much hidden from the developer.
I was also kind of considering using WF to do similar sort simplification of async programming on the server side. Any suggestions would be appreciated.
Nice work!
said
Apr 7 2010
I can't get the sample to build. Do I need to install Unity or MEF first?
'System.ComponentModel.Composition.Hosting.CompositionHost' does not contain a definition for 'Initialize' IoC.cs line 12
'System.Windows.Window' does not contain a definition for 'Closing' and no extension method 'Closing' accepting a first argument of type 'System.Windows.Window' could be found (are you missing a using directive or an assembly reference?) App.xaml.cs line 25
Rob Eisenberg said
Apr 8 2010
Can you confirm that you are using the SL4 RC? It sounds like you may not have the right version installed.
David Risko said
Apr 8 2010
Great webcast! I am particularly intrigued by your implementation of coroutines. Thanks for the presentation, I will definitely be checking out Caliburn.
David Risko said
Apr 8 2010
Great webcast! I am particularly intrigued by your implementation of coroutines. Thanks for the presentation, I will definitely be checking out Caliburn.
said
Apr 8 2010
For my build issue above...Yes, I have it working now.
I did need the RC of VS 2010. I also installed the Silverlight 4 latest and the latest Silverlight toolkit.
Thanks.
Joerg Hilger said
Apr 13 2010
Very nice demo.
I was wondering how you would compose more complex Screen which would contain UserControls" which by itself are View/Viewmodels ? The view is oviously created by the hosting view but how is the ViewModel boud to it?
Another question would be how you deal with dialogs in you paradigm?
Rob Eisenberg said
Apr 26 2010
@Joerg
The demo I showed actually composes viewmodels within viewmodels and views within views. I think you will see this if you take a very close look at the code.
Handling dialogs is actually pretty simple. I see a lot of people struggling with this, but there is a very elegant solution. Create an IResult for showing a dialog. You can use IResult to solve all sorts of "complex" issues. Some other ideas are to use it for message boxes or playing animations.
Shane said
Apr 30 2010
Hi Rob,
I love your demo.
I have a question though. I have a View Model loaded into the shell viewmodel that has two columns. I want to load a viewmodel into each column which is not a problem. The view model on the left is essentially navigation. Now when I click one of the buttons in the left column viewmodel I want that to change the viewmodel in the right column. So I have two child viewmodels that I want to interact.
Do you have any suggestions on how to handle this?
Thanks!
Rob said
May 6 2010
@Shane
It sounds like you have a typical ScreenConductor + ScreenCollection scenario. Basically, you can solve this by following the same pattern that the shell itself uses. The difference is that your new conductor is going to have a list of possible screens to navigate to. Your view will have two columns: one column will have a list bound to the availale screens with its selection bound to the ActiveScreen, the other column will simply be a content control (or transition presenter) with a View.Model attached property bound to ActiveScreen.
jon said
Jun 22 2010
When your using two-way binding how do you go about handling cancels/undo's on data entry?
Rob Eisenberg said
Jul 5 2010
If you found this talk interesting, let me invite you to try out Caliburn.Micro, a small version of Caliburn inspired by the framework I demonstrated in this talk. You can find more information on CodePlex by searching "Caliburn Micro."
said
Jul 17 2010
[[url=http://www.fivefingerssupply.com/][b]vibram five[/b][/url]
[url=http://www.fivefingerssupply.com/][b]vibram five fingers[/b][/url]
[url=http://www.fivefingerssupply.com/][b]vibram shoes[/b][/url]
[url=http://www.fivefingerssupply.com/][b]fivefingers[/b][/url]
[url=http://www.fivefingerssupply.com/][b]vibram fivefingers[/b][/url]
[url=http://www.fivefingerssupply.com/][b]five fingers shoes[/b][/url]
[url=http://www.fivefingerssupply.com/][b]fivefingers vibram[/b][/url]
[url=http://www.fivefingerssupply.com/][b]five fingers vibram[/b][/url]
[url=http://www.fivefingerssupply.com/][b]five fingers vibram sale[/b][/url]
[url=http://www.fivefingerssupply.com/][b]five fingers vibram uk[/b][/url]
[url=http://www.fivefingerssupply.com/][b]five fingers[/b][/url]
[url=http://www.fivefingerssupply.com/][b]vibram five fingers sale[/b][/url]
[url=http://www.fivefingerssupply.com/][b]vibram bikila[/b][/url]
[url=http://www.fivefingerssupply.com/vibram-five-fingers-classic-c-2.html][b]Vibram five fingers Classic[/b][/url]
[url=http://www.fivefingerssupply.com/vibram-five-fingers-classic-c-2.html][b]Vibram five fingers Classic Sale[/b][/url]
[url=http://www.fivefingerssupply.com/vibram-five-fingers-sprint-c-3.html][b]vibram five fingers sprint[/b][/url]
[url=http://www.fivefingerssupply.com/vibram-five-fingers-sprint-c-3.html][b]vibram five fingers sprint women[/b][/url]
[url=http://www.fivefingerssupply.com/vibram-five-fingers-sprint-c-3.html][b]vibram five fingers sprint mens[/b][/url]
[url=http://www.fivefingerssupply.com/vibram-five-fingers-sprint-c-3.html][b]vibram five fingers sprint sale[/b][/url]
[url=http://www.fivefingerssupply.com/vibram-five-fingers-kso-c-1.html][b]vibram kso[/b][/url]
[url=http://www.fivefingerssupply.com/vibram-five-fingers-kso-c-1.html][b]five fingers kso[/b][/url]
[url=http://www.fivefingerssupply.com/vibram-five-fingers-kso-c-1.html][b]vibram five fingers kso[/b][/url]
[url=http://www.fivefingerssupply.com/vibram-five-fingers-kso-c-1.html][b]vibram five fingers kso sale[/b][/url]
[url=http://www.fivefingerssupply.com/vibram-five-fingers-kso-c-1.html][b]vibram five fingers kso women's[/b][/url]
[url=http://www.fivefingerssupply.com/vibram-five-fingers-kso-c-1.html][b]vibram five fingers kso mens[/b][/url]
[url=http://www.fivefingerssupply.com/vibram-five-fingers-kso-c-1.html][b]vibram five fingers kso black[/b][/url]
[url=http://www.fivefingerssupply.com/vibram-five-fingers-kso-trek-c-4.html][b]vibram five fingers kso trek sale[/b][/url]
[url=http://www.fivefingerssupply.com/vibram-five-fingers-kso-trek-c-4.html][b]vibram five fingers kso trek[/b][/url]
[url=http://www.fivefingerssupply.com/vibram-five-fingers-kso-trek-c-4.html][b]vibram kso trek[/b][/url]
[url=http://www.fivefingerssupply.com/vibram-five-fingers-kso-trek-c-4.html][b]vibram trek[/b][/url]
[url=http://www.vibramfivefingerssupply.com/][b]vibram[/b][/url]
[url=http://www.vibramfivefingerssupply.com/][b]vibram fingers[/b][/url]
[url=http://www.vibramfivefingerssupply.com/][b]vibram five[/b][/url]
[url=http://www.vibramfivefingerssupply.com/][b]vibram five fingers[/b][/url]
[url=http://www.vibramfivefingerssupply.com/][b]vibram shoes[/b][/url]
[url=http://www.vibramfivefingerssupply.com/][b]fivefingers[/b][/url]
[url=http://www.vibramfivefingerssupply.com/][b]fivefingers vibram[/b][/url]
[url=http://www.vibramfivefingerssupply.com/][b]five fingers vibram[/b][/url]
[url=http://www.vibramfivefingerssupply.com/][b]five fingers vibram sale[/b][/url]
[url=http://www.vibramfivefingerssupply.com/][b]five fingers vibram uk[/b][/url]
[url=http://www.vibramfivefingerssupply.com/][b]five fingers[/b][/url]
[url=http://www.vibramfivefingerssupply.com/][b]vibram five fingers sale[/b][/url]
[url=http://www.vibramfivefingerssupply.com/vibram-five-fingers-classic-c-2.html][b]Vibram five fingers Classic[/b][/url]
[url=http://www.vibramfivefingerssupply.com/vibram-five-fingers-sprint-c-3.html][b]vibram five fingers sprint[/b][/url]
[url=http://www.vibramfivefingerssupply.com/vibram-five-fingers-sprint-c-3.html][b]vibram five fingers sprint women[/b][/url]
[url=http://www.vibramfivefingerssupply.com/vibram-five-fingers-sprint-c-3.html][b]vibram five fingers sprint mens[/b][/url]
[url=http://www.vibramfivefingerssupply.com/vibram-five-fingers-sprint-c-3.html][b]vibram five fingers sprint sale[/b][/url]
[url=http://www.vibramfivefingerssupply.com/vibram-five-fingers-kso-c-1.html][b]vibram five fingers kso[/b][/url]
[url=http://www.vibramfivefingerssupply.com/vibram-five-fingers-kso-c-1.html][b]vibram five fingers kso sale[/b][/url]
[url=http://www.vibramfivefingerssupply.com/vibram-five-fingers-kso-c-1.html][b]vibram five fingers kso women's[/b][/url]
[url=http://www.vibramfivefingerssupply.com/vibram-five-fingers-kso-c-1.html][b]vibram five fingers kso mens[/b][/url]
[url=http://www.vibramfivefingerssupply.com/vibram-five-fingers-kso-c-1.html][b]vibram five fingers kso black[/b][/url]
[url=http://www.vibramfivefingerssupply.com/vibram-five-fingers-kso-c-1.html][b]vibram five fingers kso trek sale[/b][/url]
[url=http://www.vibramfivefingerssupply.com/vibram-five-fingers-kso-c-1.html][b]vibram kso[/b][/url]
[url=http://www.vibramfivefingerssupply.com/vibram-five-fingers-kso-trek-c-4.html][b]vibram five fingers kso trek[/b][/url]
[url=http://www.vibramfivefingerssupply.com/vibram-five-fingers-kso-trek-c-4.html][b]vibram kso trek[/b][/url]
[url=http://www.vibramfivefingerssupply.com/vibram-five-fingers-kso-trek-c-4.html][b]vibram trek[/b][/url]