Just wondering if anyone had any ideas for a design
pattern for storing version history of a model and providing a means to view diffs on this.
We have an "application" that is submitted via our web interface and can be modifed and resubmitted later. We need a means to capture the changes each time that it is changed, then present a change report that can show the difference between each change. We came up with a few solutions - but none are that great, so I was wondering if there was a pattern for it - I'm sure this is a common requirement... or maybe I am outside the realms of design patterns here.
We are using Spring & JPA for persistence. The model is fairly complex and we only need a subset of the application to be versioned - otherwise I would probably flick it to the DBAs and get them to implement history tables. I might still suggest that approach, but still madly hunting around for other solutions.