The Model-View-ViewModel pattern (MVVM) is an architectural approach that is popular with WPF and Silverlight developers. Given the expanded opportunity to use Xaml with Windows 8 “Metro” applications, its popularity will continue. The MVVM code pattern provides a technology-independent way of defining the data needed by a view that promotes a clean separation between building the code and the building the UI.

In this tutorial, we cover the basics of the MVVM pattern and show how an application can be created with no “code behind” in the user interface code. Using a simple database we build a view model and show how it can be can be used to populate a Silverlight client application.