Hi!
In user interfaces there is often a need to implement a cancel button when editing some entities. In WPF it would be nice if you could make your view model transactional. I will try to explain a little bit more in detail what I mean:
The view model is connected to the model and exposes data in a way that's easier to handle for the view (utilizing data binding). Changes to the view model result in changes in the model. However, if there is a cancel button you usually don't want to perform the changes immediately on the model, so I think of some kind of buffering changes. When you commit the changes, there are being transferred to the model, otherwise they are deleted.
Right now I have implemented a solution that creates a proxy of the view model which is bound to the view instead of the real view model. The proxy is not connected to the model but records changes to properties and method calls by using interceptors. There is a submit method which applies the invocations on the real view model. I think that's quite a good solution but it is still quite buggy (if the view model contains collections and so on).
I'm looking for a framework which does this kind of stuff. Are there any out there?
Best Regards,
Oliver Hanappi