Microsoft Developer Network - Easy MVVM Example
"This project will give you crash course on WPF MVVM that you can do in your lunch break! Everything you need to know about binding, INotifyPropertyChanged, Dependency Objects & Properites, POCO objects, Business Objects, Attached Properties and much more!
Easy MVVM examples (in extreme detail)
This article discusses the various methods and tricks used in MVVM to enable a developer to completely separate the user interface from the code.
Table of Contents
- Introduction
- Classic INotifyPropertyChanged
- DataContext Made in Code
- Using DependencyObject instead of INPC
- Using POCO objects with MVVM
- How to consume a closed Business Object (database layer, web service)
Introduction
Model View ViewModel is the golden child of WPF, allowing a developer to completely separate their application code from any UI dependencies.
This means an application can be easily be re-skinned and it also makes an application much easier to test.
The View represents any front-end user interface controls (Window, Page, UserControl), the model represents the classes used in the application, and the ViewModel is the middle-man that requests, molds and exposes the data, as properties and commands.
This is article is linked to a TechNet sample project that you can download and explore. It covers many basic concepts of MVVM, and some of the common pitfalls and solutions.
This is one of those helper articles for those that have been meaning to look into/learn/grok MVVM but haven't yet found the time too...
No comments:
Post a Comment
NOTE: Anonymous Commenting has been turned off for a while... The comment spammers are just killing me...
ALL comments are moderated. I will review every comment before it will appear on the blog.
Your comment WILL NOT APPEAR UNTIL I approve it. This may take some hours...
I reserve, and will use, the right to not approve ANY comment for ANY reason. I will not usually, but if it's off topic, spam (or even close to spam-like), inflammatory, mean, etc, etc, well... then...
Please see my comment policy for more information if you are interested.
Thanks,
Greg
PS. I am proactively moderating comments. Your comment WILL NOT APPEAR UNTIL I approve it. This may take some hours...