Azure DevOps, Scrum, & .NET Software Leadership and Consulting Services

Free course! Predicting the Future, Estimating, and Running Your Projects with Flow Metrics

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


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.

SUBSCRIBE TO THE BLOG


Leave a Reply

Your email address will not be published. Required fields are marked *

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