Chapter 33. Structuring and testing with the MVVM pattern

 

This chapter covers

  • Creating services for use with MVVM
  • Using commands and the CallMethodAction behavior
  • Testing using the Silverlight Unit Testing Framework

When the community stops worrying about how to do basic things in a particular technology and starts working out how to do complex things well, you know the technology has reached a point of maturity. The emergence of architectural patterns and testing capabilities for a platform are a good indicator that the technology is ready for real-world use in nontrivial applications. Silverlight hit that point some time between Silverlight 3 and Silverlight 4.

One of the main patterns to be applied to Silverlight is the Model-View-View-Model (MVVM) pattern, also known as the ViewModel pattern.

Note

MVVM or ViewModel pattern? Different groups like to call it different things. I’ll use both interchangeably until the community settles on one over the other. There are some influential folks on both sides of this debate.

33.1. Project setup and traditional code-behind approach

 
 
 
 

33.2. Model-View-ViewModel basics

 
 
 

33.3. Factoring out reusable code

 

33.4. Better separation from the UI

 

33.5. Testing MVVM applications

 
 
 

33.6. Summary

 
sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage
test yourself with a liveTest