BT
x Your opinion matters! Please fill in the InfoQ Survey about your reading habits!

WAF and Caliburn: 2 WPF Application Frameworks

by Abel Avram on Aug 19, 2010 |

WPF Application Framework (WAF) and Caliburn are two open source frameworks offering the foundation to developers to write WPF/Silverlight applications based on the Model-View-ViewModel (MVVM) pattern using a layered architecture.

WAF uses the Model-View-ViewModel (MVVM) pattern, which is quite similar to the PresentationModel, as defined by Martin Fowler. This pattern, as used by WAF, can be described by the following UML diagram:

Model-View-ViewModel Pattern

View – this class contains all the GUI widgets, but not their state nor behavior.

IView – an interface for the View class.

ViewModel – contains the state and behavior for the GUI widgets. The reason those elements are saved here is to avoid tying the application code to the GUI interface, so the application can be easily ported to a different GUI system. The ViewModel can interact with View through its interface.

Controller – The MVVM pattern does not mention a controller but WAF contains one, having the responsibility to direct the flow of the application. If necessary, ViewModel informs the Controller on changes through events.

Model – An underlying domain class. Changes in the Model are transmitted to the View or ViewModel via events.

WAF is built with a layered architecture in mind as the one presented below:

layered-architecture.png

The framework contains basic classes/interfaces which are to be extended to fit the application, such as Controller, IView, ViewModel, Model, and also a number of file dialog/message service classes. The framework also comes with code samples for a book library, an email client, a document oriented application, and also basic support for unit tests. WAF has been submitted to CodePlex by user jbe2277, which did not decline his identity, but he seems to be a developer on the Microsoft pattern&practices Smart Client Contrib team.

Caliburn is yet another open source WPF and Silverlight framework, built around the same MVVM pattern. The project’s website mentions the following features:

  1. Extends data binding to methods, making MVVM architectures simple and intuitive.
  2. Adds pre/post execution filters and rescues to MVVM actions.
  3. Simplifies asynchronous programming through a powerful implementation of co-routines.
  4. Provides base classes supporting common UI roles such as Screen Activator, Screen Conductor, Screen Collection and Application Controller.
  5. Encourages a convention over configuration approach to architecting solutions.
  6. Supports TDD by providing a powerful data binding validation framework for WPF.
  7. Enables use of the same API for WPF and Silverlight architectures

The framework seems to be similar to WAF in many ways but it is more mature having over 100 classes/interfaces. It also comes with Silverlight and WPF samples such as a Contact Manager and a Game Library. Caliburn is backed by Blue Spire.

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

mvvmlight.codeplex.com by Dzmitry Lahoda

Features:
* "Blendability" - integration with Blend (and Visual Studio project templates)
* "light" - only essential components (as stated at MIX 2010 live.visitmix.com/MIX10/Sessions/EX14)

Backed by identitymine.com (author of framework and author of book "Advanced MVVM" work there).

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

1 Discuss

Educational Content

General Feedback
Bugs
Advertising
Editorial
InfoQ.com and all content copyright © 2006-2014 C4Media Inc. InfoQ.com hosted at Contegix, the best ISP we've ever worked with.
Privacy policy
BT