— New online course!  Getting Started with Azure DevOps — Special launch price 50% off —

6 Model-View-ViewModel (MVVM) Tips for Unit Testing Silverlight, WP7, and WPF

by

My article for Visual Studio Magazine just went live.  “6 Model-View-ViewModel (MVVM) Tips: Leverage ViewModel and Unit Test Silverlight and WP7 Apps”

SNAGHTMLba17d85

Here are the tips:

1. Separate the Model from the ViewModel, no matter what
2. The classes from “Add Service Reference” are not your Models or your ViewModels
3. Separate your ViewModel and Model from your data-access logic with the Repository Pattern
4. Use the Adapter pattern between ViewModel and Model, and Model and Service Data Transfer Objects
5. In Silverlight, figure out early on how you’re going to handle asynchronous methods
6. Simplify your bindings and your validation code with ViewModelField<T> and custom controls

Enjoy.

-Ben

 

— Looking for help architecting and developing your Silverlight application?  Running into questions about testing your Silverlight application with Microsoft Test Manager (MTM)?  Drop us a line at info@benday.com.


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: