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.