Thursday, 12 February 2009

Silverlight + Model-View-ViewModel (MVVM)

I've been collecting links & info about Model-View-ViewModel in Silverlight (and WPF) for a while - these are my favourites:
StackOverflow question Should I use the Model-View-ViewModel (MVVM) pattern in Silverlight projects? Links to a couple of good posts including
MSDN Magazine's WPF Apps With The Model-View-ViewModel Design Pattern
Why WPF Developers Love MVVM

Once a developer becomes comfortable with WPF and MVVM, it can be difficult to differentiate the two. MVVM is the lingua franca of WPF developers because it is well suited to the WPF platform, and WPF was designed to make it easy to build applications using the MVVM pattern (amongst others). In fact, Microsoft was using MVVM internally to develop WPF applications, such as Microsoft Expression Blend, while the core WPF platform was under construction. Many aspects of WPF, such as the look-less control model and data templates, utilize the strong separation of display from state and behavior promoted by MVVM.
Dan Crevier's DataModel-View-ViewModel pattern series 8-part series including sample DataModel and ViewModel (WPF-focused).
David Wynn's Silverlight and the View-ViewModel Pattern Example using NInject, Silverlight Extensions (Command) and Unit Testing.
Josh Smith discusses MVVM eliminates 99% of the need for ValueConverters Paul Stovell, Laurent Bugnion, Jaime Rodriguez (among others) weigh in on the proposition that:
The only place I can see a use for value converters in an MVVM architecture is cross-element bindings. If I'm binding the Visibility of a panel to the IsChecked of a CheckBox, then I will need to use the BooleanToVisibilityConverter.
Mark Heath's Model View View-Model (MVVM) in Silverlight Basic 'scoreboard' example demonstrating MVVM in Silverlight 2.0
John Gossman's Introduction to Model/View/ViewModel pattern for building WPF apps Whoa - John talks about MVVM back in October 2005, talking about the "Sparkle UI". The MSDN article (above) quote "In fact, Microsoft was using MVVM internally to develop WPF applications, such as Microsoft Expression Blend, while the core WPF platform was under construction" must be true!

I've kept a copy on conceptdevelopment.net too.

No comments:

Post a Comment