We store objects in XML. Sometimes we update the base objects, then we have to save more data in our files to represent the extra attributes of our objects.
How to organize/implement a system to ensure backwards compatibility with old versions of our files?
The complicated part comes when looking at several versions at once.
Version 1 -> Version 2 -> Version 3 -> Version 4
Should we write four file readers, one for each version of the file to read it into the current latest version of our object? Or, should we keep all the old versions of the classes around from versions 1-3 so that the old readers can read the data into those classes, and then have incremental updaters to update 1->2
and then 2->3
and then 3->4
.