You're no doubt familiar with projects whose views have a lot of code-behind, where that code-behind pushes data into the view. To behave in this fashion, the code needs to have intimate knowledge of the view itself. However, many benefits could be gained by having the view's logic extracted away from the view and into another class. It would then be totally ignorant of the view, and simply act as a provider of data and operations to it. In other words, a better design would result from having a clean separation of concerns between a view's look and its behavior. This is what the MVVM design pattern aims to achieve.
Note Although the implementation will be somewhat different, the MVVM design pattern does share a lot in common with the way that you design custom controls (discussed in Chapter 12). When looking at it from this perspective, a view is analogous to a control template, and a ViewModel is analogous to a control's logic.
One of the big issues with having all or much of the logic and behavior of a view written in its code-behind is that logic located there is simply not testable. Intertwining a view's look with its behavior means both have intimate knowledge of one another. This bidirectional tight coupling makes testing the view's behavior an incredibly difficult and messy, if not impossible, task.
Even if you do not write unit tests against your code (although you should strongly consider doing so) and don't consider testability a concern, implementing MVVM in your application still provides numerous other benefits:
As you can see, there are many potential benefits gained from implementing the MVVM design pattern in your Silverlight business applications.