Chapter 16. Structuring and testing with the MVVM/ViewModel pattern

 

This chapter covers

  • The ViewModel or MVVM pattern
  • 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.

One of the main patterns to be applied to Silverlight is the Model-View-ViewModel (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.

16.1. Project setup and traditional code-behind approach

 
 
 

16.2. Model-View-ViewModel basics

 
 

16.3. Factoring out reusable code

 
 

16.4. Better separation from the UI

 
 
 

16.5. Testing

 
 
 

16.6. Summary

 
sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage