In my previous projects, I have already implemented undo system in c++, and I know how it work. I am also aware of the Command pattern.
I will be implementing a C#/WPF desktop application and would like to base my design on the M-V-VM pattern.
The application will:
- be relatively a small project (2-3 weeks estimated work for 1 dev)
- have a simple data model with persistence (linq to XML)
- support undo/redo
I was wondering if anybody has experience with implementing an undo system when following the M-V-VM pattern. How would it fit in it? How can it benefit from the INotifyPropertyChanged and INotifyCollectionChanged notifications so minimal work is required when implementing the Models (business objects).
I would think the undo system would some kind of integrated into the ViewModel layer, as it is a UI state.
Any thought?