New MVVM Tutorial

With the increased importance of XAML in Windows 8, I have decided to update my tutorial on the Model View View-Model pattern. As I said in my original MVVM tutorial, I finally understand the pattern well enough to make some intelligent comments about its use.

The tutorial begins by contrasting the traditional “code behind” approach with the MVVM approach and provides motivation for using the MVVM pattern. The tutorial uses a Silverlight client as the demonstration application. We start by building a simple view model that downloads data from a RIA Data Service and exposes the collection of data to the UI. We then add CRUD (minus the update) functionality to the application and show how our view model handles these requirements.

The tutorial uses Visual Studio 11 beta and Visual Basic. If any changes are needed after VS 11 is released, I will update the tutorial appropriately.

When the tutorial is complete, a simple functioning application is created using the MVVM pattern and zero lines of code behind.


3 Responses to “New MVVM Tutorial”

  1.   Jim Says:

    Bill, this is the best and detailed tutorial in Silverlight I have ever watched. It’s really hard to find a tutorial in VB. I finally found it. Thanks a lot.
    It will be wonderful if you’d cover foreign key (user selected value from dropdownlist) and backend update (to trigger other files updating in MVVM) in the future.

  2.   Burrows Says:

    Zip up your project and send it to me and I’ll take a look.

    bill (

  3.   PHenry Says:

    I’m doing your tutorial with C# and my own sql server db. Unfortunately things progress GREAT right up until I F5 the project and I get a null reference exception for the context when I try to do context.GetSchoolListQuery(). PLEASE help me out with this? I don’t know what to search for to make this work, nor can I ram it down VS/RIA Service throat TO make it work. I’m tired and no amount of coffee is helping me get THROUGH this barrier.

Leave a Reply