WPF and MVVM: Advanced Model Treatment
In this course, you learn how to use Model-wrappers in your MVVM-application for several scenarios: to highlight changed fields, to highlight invalid fields, to display validation errors, to enable the save button only if there are changes, and much more.
In many modern architectures, your client-application just receives simple Models from the server. These Models often don't have the logic you need in your application. It starts already with the missing information if the Model is changed or not. Without that information, you can't enable or disable the save-button based on the fact if the user has changed the Model or not. This is just one problem that is solved by the powerful Model-wrappers that we create in this course. These Model-wrappers will contain the typical functionality you need in your application: change notification, change tracking, and validation. You learn how to build these Model-wrappers by using Test Driven Development (TDD). And, as this course is about WPF and MVVM, you learn how to use the Model-wrappers in your MVVM-application. You learn how to highlight changed fields with a different background-color, how to display the original value of a changed field in the tooltip, how to highlight invalid fields, how to display validation errors, how to enable the save button only if there are changes, how to check for changes when closing a tab or even the application, how to reset the Model to its original state, and much more. Throughout this course, you learn how to extend a typical MVVM-based WPF-application called FriendStorage with all this functionality.
Course SyllabusIntroduction- 38m 39s
—Introduction 1m 26s
—Course Outline 4m 6s
—Why Are Services Using POCOs? 2m 3s
—Challenges with POCOs in the Client 2m 17s
—The FriendStorage-application 13m 14s
—Challenges with POCOs in FriendStorage 7m 4s
—Mastering POCOs in a ViewModel 3m 9s
—Mastering POCOs in a Model-wrapper 1m 49s
—Summary 3m 27sNotifying About Model Changes- 54m 12sTracking Model Changes- 1h 23mDisplaying Model Changes- 1h 24mValidating the Model- 1h 12mDisplaying Validation Errors- 35m 8sGenerating Model-wrappers with T4- 45m 56s