Persistence ignorance and custom models
So far, we have used generated classes as our models. We will now look at creating a custom model and will add persistence ignorance to our design.
Trade-offs of generated models
The Microsoft technology stack provides plenty of solutions that allow for getting up and running with models that support change notifications via INotifyPropertyChanged
. As with everything in software development, there are trade-offs to be considered when determining what type of architecture you need; the advantages and disadvantages of using generated models are shown as follows:
Advantages |
Disadvantages |
---|---|
Quick to develop |
Couples Presentation with data access |
Models are generated for you |
Changing data access requires difficult ... |
Get MVVM Survival Guide for Enterprise Architectures in Silverlight and WPF now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.