A quick tour of existing MVVM frameworks

[Article updated november, 26th: see my latest blog post for a better experience browsing the frameworks]

One year ago MVVM wasn’t very famous. I remember the first article I read about it, about using MVVM to simplify the management of treeview controls. In the last six months, MVVM has been quickly promoted to THE methodology to use when developing WPF applications. During this amount of time, famous WPF developers started to merge their existing MVVM classes into libraries. Those libraries are now known as MVVM frameworks and contain classes designed to help developers to use MVVM in their projects.

In this article, I’m going to make a quick tour of the available MVVM frameworks.

If your own framework is not in this list or if I made a mistake while describing your work, please let me know using the contact form (available at the top of this page).

Common features:

  • ViewModelBase class (for the implementation of the INotifyPropertyChanged interface)
  • RelayCommand like class to link UI command to ViewModel’s handlers
  • Unit tests comes with the framework

Cinch

  • Author: Sacha Barber
  • Silverlight support: no
  • Documentation: excellent, 6 articles published on CodeProject
  • Hosting : CodePlex
  • License:  Code Project Open License
  • Features:
    • attached behaviors
    • validation suing IDataErrorInfo
    • support for IEditableObject
    • weak events creation and subscription
    • mediator messaging using weak events
    • IOC/DI support (using Unity)
    • services: event logger, message box, open save dialog, popup
    • threading helpers
    • support for menu items
    • closeable viewmodels
    • MVVM code generator

MVVM Light Toolkit

  • Author: Laurent Bugnion
  • Silverlight support: yes
  • Documentation: many articles available on Laurent’s blog + other developers as well
  • Hosting: CodePlex
  • License: MIT license
  • Features:
    • MSI installer
    • VS project and item template
    • VS code snippets
    • Messenger system for inter-viewmodel communication

MVVM Helpers

  • Author: Mark Smith
  • Silverlight support: no
  • Documentation: some articles on Mark’s blog
  • Hosting: personal website
  • License: not defined
  • Features:
    • attached behaviors
    • viewmodel creation using markup extension
    • attributes based validation
    • IOC/DI using ServiceProvider approach
    • closeable viewmodel
    • wait cursor (using new WaitCursor() { // your code here })

MVVM Foundation

  • Author: Josh Smith
  • Silverlight support: no
  • Documentation: articles about the Messenger implementation on Josh or Marlon Grech’s blog
  • Hosting: CodePlex
  • License: MS-PL
  • Features:
    • Messenger system for inter-viewmodel communication
    • PropertyChanged event monitor

Caliburn

  • Author: Rob Eisenberg
  • Silverlight support: yes
  • Documentation: complete online documentation available
  • Hosting: CodePlex http://www.codeplex.com/caliburn
  • License: MIT license
  • Features:
    • commands are built on top of Actions and thus share many of the same features, including multiple input parameters, filters and automatic asynchronous execution
    • presenters that handles UI lifecycle issue such as handling activation, deactivation and shutdown semantics for various UI components
    • Caliburn applications are fully testable
    • various utilities such as a background task manager
    • supports various UI pattern (not MVVM only)
    • dependency injection container

Onyx

  • Author: William e Kempf
  • Silverlight support: no
  • Documentation: basic introduction available on CodePlex
  • Hosting: CodePlex
  • License: not specified
  • Features:
    • ServiceLocator pattern
    • ViewModel creation using a custom markup extension
    • UI related services such as IDisplayMessage

Calcium

  • Author: Daniel Vaughan
  • Silverlight support: no
  • Documentation: 2 very detailed articles on CodeProject (part1 and part2)
  • Hosting: CodePlex
  • License: use, copy, modify, and/or distribute and keep the copyright!
  • Features:
    • Module Manager for enabling or disabling of modules at runtime
    • messaging services for interacting with the user from the client or server using the same API
    • Command Service to associate WPF ICommands with content interfaces that only become active when an active view or viewmodel implements the interface
    • Region Adapters for ToolBars and Menus
    • Client-server logging ready to work out-of-the-box
    • Includes modules, such as a Web Browser, Text Editor, Output Window, and many more
    • Tabbed interface with dirty file indication (reusable across modules)

nRoute

  • Author: Rishi
  • Silverlight support: yes
  • Documentation: many articles available on author’s blog (see CodePlex project home page for the links)
  • Hosting: CodePlex
  • License: MS-PL
  • Features:
    • support Blend3 behaviors and triggers models
    • resource locator framework
    • view services: OpenFileDialog, ShowMessage…
    • uses attributes to map View and ViewModel together

Nito MVVM

  • Author: Shammah
  • Silverlight support: no
  • Documentation: no
  • Hosting: CodePlex
  • License: not specified
  • Features:
    • various MVVM friendly implementations of the ICommand interface

Ocean

  • Author: Karl Shifflet
  • Silverlight support: no
  • Documentation: articles available on Karl’s blog
  • Hosting: personal website
  • License: not specified
  • Features:
    • written in VB.Net
    • attribute based validation
    • viewmodel base classes: relaycommand, closeableviewmodel…
    • SQL server data access layer

Basic MVVM framework

  • Author: Lester Lobo
  • Silverlight support: no
  • Documentation: sample application available with the library
  • Hosting: CodePlex
  • License: MS-PL
  • Features:
    • delegating Commands\Keybinding
    • messaging between VM’s
    • handling events as commands with attached behaviors
    • handling dialogs (and more) as services
    • VS code snippets

GoodLight

  • Author: Peter O’Hanlon
  • Silverlight support: yes
  • Documentation: sample application available with the library
  • Hosting: CodePlex
  • License: MS-PL
  • Features:
    • “workspace” management (set of document that can be closed)
    • skin support
    • messaging between VM’s

As you can see, each frameworks has its pros and cons. If you want a light Silverlight-compatible framework, Laurent’s framework is very nice. If you want a very rich framework, Sacha’s one is excellent. Whatever what your requirements are, each framework is very interesting and browsing the source code is a good way to understrand how stuff works and find cool ideas for your own needs.

To conclude, I’d like to thanks all those people who work very hard for the community ! An interesting discussion started a couple of days ago on the WPF disciples Google group about the creation of a common framework. Have a look here.

kick it on DotNetKicks.com

36 thoughts on “A quick tour of existing MVVM frameworks

  1. Hi Jeremy,

    Thanks for this article. It’s really easy to get lost in the jungle of MVVM frameworks, all written by MVVM gurus, so a bit of guidance is welcome !

    According to the discussion you mentioned, all WPF disciples agree… on NOT creating a common MVVM framework :(. That’s a bit of a disappointment, but I understand their position… Each developer has its own approach to MVVM and might not be comfortable with a framework designed by someone else.

    Actually, I think I agree with Justin Angel that “one really doesn’t need an MVVM framework”. It’s pretty easy to build your own MVVM tools, that will closely fit your needs, by picking ideas here and there and adapting them when necessary…

  2. Nice overview! It would even be nicer if you would put everything into one matrix (rows=features, columns=frameworks) :-)

    And yet another framework to add, the WPF Application Framework (WAF) at http://waf.codeplex.com.

  3. Just a word about my MVVM Light Toolkit: It is under the MIT License, and is also available on Codeplex at mvvmlight.codeplex.com.

    Of note, I am still working on it, and new features have been released (in alpha status so far) not long ago. More to come soon.

    Cheers,
    Laurent

  4. Thank you Laurent for the feedback, I updated your info. As I’m already following your blog, I’ll try to update the feature list as soon as I get the news from your blog :)

  5. You missed one: http://updatecontrols.codeplex.com

    The differentiating feature of Update Controls is that it automatically discovers dependencies of the view model upon the data model. You can implement complex logic on the view model that brings together multiple data model properties. You can even query the data model with Linq. Update Controls will fire PropertyChanged events from the view model when any of the data model properties chages. And it even works with Silverlight and Winforms.

  6. Sacha Barber here author of Cinch, I just found this post, and was wondering if you could update 2 aspects of the section on Cinch, could you mention Cinch V2 offers FULL Silverlight 4 support including ChildWindows. Is also offers design time data services and service resolution using standard .NET classes (MEF), and that you can create ViewModels using attached properties.

    thanks

  7. Hi Sacha,

    I’ll take all your remarks into account for the next update I’m doing this week :-)

    Thanks for giving feedback !

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>