For some time I am working on enhancing my Birthdays Synchronizer application. The last modification I made is to support Google calendar. But before releasing it I decided to upgrade the application look & feel to something more appealing..
Since I’m quite experienced with the .NET framework, I decided to give it a shot and implement the change with WPF.
When I just started the development, I found that the MCV pattern is not working so well with WPF. This is mainly because the view layer of WPF, based on XAMLs, has enormous capabilities (the bindings in particular) which make it hard to follow the traditional controller-viewer separation.
Here comes the part where MVVM pattern comes in hand. MVVM stands for Model, View and View Model. The model is the data object we are working on. For example, a birthday object, consisting from the person name and birthday date. The View Model is the layer responsible for the business logic and the operations that supports the view. For example, saving the birthdays to Outlook or getting from Outlook the available calendar folders. The view is the actual UI. It relays on the View Model while the View Model itself is not relay on any view. This point is important to follow and understand. It means that the View uses the View Model for its operations, but the View Model must not know that it works with any specific view.
If you are just getting started with WPF development, I really recommend using the WPF MVVM toolkit. It adds a solution template to visual studio which allows you to create WPF projects following the MVVM pattern. The projects it creates have built-in solution folders for each MVVM layer and some classes to get you started. It also comes with a great document describing the MVVM patters in details and in a simplified language.
Good luck