The Model-View-ViewModel (MVVM) pattern helps to cleanly separate the business and presentation logic of an application from its user interface (UI). This separation is key for testability, maintenance and scalability.
Here’s an introduction to MVVM which illustrates how it leverages WPF data binding and commands.
The main difference between what we’re proposing and how they define MVVM in the previous articles is, by using a convention-based framework such as Caliburn.Micro and events/commands to wire up the View and ViewModel, they are completely decoupled allowing for better testability and future scalability. The Caliburn.Micro wiki has a good introduction to the functionality it provides.
This article gives a good introduction to Attribute Based Validation which allows us to keep validation logic down in the business layer and entities where it can then bubble up and be reflected in the UI.
If there’s interest in going deeper, here’s an article on using a Service Oriented Architecture (SOA) to decouple service providers from consumers allowing for greater reuse and insulating the application from core business logic.
Finally, a series of articles outlining the use of a Generic Repository with Entity Framework 4 (EF4) to reduce the amount of plumbing that must be written and maintained for data access.
MVVM with WPF Series Part 1. Disconnected WPF Applications
MVVM with WPF Series Part 2. WPF MVVM with WinForms Controls