MVVM Light Toolkit

New release: MVVM Light Toolkit V2

Current version: V2.0.0, released 4th of October 2009

New alpha release: MVVM Light Toolkit V3 Alpha 3

Includes support for WPF4 and SL4 in Studio 2010 and Blend Preview 4

Current alpha version: V3.0.0/a3, released 30th of November 2009

Introduction

The main purpose of the toolkit is to accelerate the creation and development of MVVM applications in WPF and Silverlight.

Like other MVVM implementations, the toolkit helps you to separate your View from your Model which creates applications that are cleaner and easier to maintain and extend. It also creates testable applications and allows you to have a much thinner user interface layer (which is more difficult to test automatically).

This toolkit puts a special emphasis on the "blendability" of the created application (i.e. the ability to open and edit the user interface into Expression Blend), including the creation of design-time data to enable the Blend users to "see something" when they work with data controls.

Much has been written about MVVM as a pattern. I recommend starting by reading Josh Smith's article at MSDN. Also great, Shawn Wildermuth's MSDN article about MVVM applied to Silverlight.

Installation and Creation

The MVVM Light Toolkit installation procedure is described here. You can also install the latest stable version, or the latest alpha/beta version manually by following the indications on this page.

To create a new MVVM Light application, check this article (for Visual Studio) and this one (for Expression Blend).

Components

This toolkit gathers a few helper components for Windows Presentation Foundation and Silverlight:

 

Source code and Codeplex

The source code for the GalaSoft.MvvmLight helper library can be downloaded here.

Note: The solution contains the WPF project, the WPF Unit Test project, the Silverlight 3 project and the Silverlight 3 Unit Test project.

I also packaged a version of the source code without unit tests, for people using versions of Visual Studio that do not support this feature.

Finally, if you are a developer, check the Codeplex site for the MVVM Light Toolkit. This is where the latest code is always available, as well as a good place to post suggestions/remarks/questions/discussions about the toolkit.

 

Articles about the MVVM "light" toolkit

By Laurent

New Versions:

Installation, Creation

Documentation about specific components:

By others

 

Credits

The creation of this toolkit would not have been possible without the following people:

Josh Smith created the RelayCommand and gracefully allowed me to integrate it with very minor changes inside the toolkit and to distribute it. He is also my "go to guy" when I have issues (with my code, I mean).

Marlon Grech started mentioning using a mediator pattern to communicate between ViewModels. This discussion led me to create the Messenger class.

Jaime Rodriguez had numerous discussions with me regarding the creation of ViewModels and gave me food for thoughts...

Glenn Block helped me finalize some thoughts and sparked a lot of new ones. He also gave me great motivation to write this toolkit, and is an early tester and reviewer of the toolkit.

Corrado Cavalli gave me a lot of fantastic feedback and ideas for new features or improving existing features, and was one of the very active early testers.

Laurent Kempé was often here to keep me company in the wee morning hours, to talk about the direction and features of the toolkit, and gave me very valuable feeback. His team at Innoveo is using the MVVM Light Toolkit in their new WPF application, and very supportive when it comes to improving and testing the latest versions!

Brian Henderson and Rob Zelt helped test early versions and gave precious feedback and suggestions to improve the features.

Steven Robbins helped me with an issue and suggested I use a hack to solve it. "I think you can safely say the worse line of code in your toolkit is my one :-)"

All the WPF Disciples for the MANY discussions we had around the pattern and the best way to implement it in various situations. You guys all rock my world!

 

Praises about the MVVM light toolkit