D
Dave Veeneman
I'm working on a project where I have to persist data to a file, rather than
to a database. Basically, I need to save the state of several classes, each
of which will have a couple of dozen instances. I have set it up to use
binary serialization to a single file, which works well. However, I have
learned that changes to my classes break the old serialized files.
While my object model is pretty stable, I am concerned that using binary
serialization will limit the ability to make changes in the future. So, I'm
thinking about adding XML serialization, either as an export option, or as a
replacement for the binary serialization I am using. That way, I can provide
a mechanism for reading prior version data files, even if a binary
serialization would be broken by the changes.
What would you suggest I do? What do you see as the benefits and drawbacks
of each approach? If I go XML serialization, should it be an export option,
or a replacement for binary serialization? Thanks for your help!
Dave Veeneman
Foresight Systems, Inc.
to a database. Basically, I need to save the state of several classes, each
of which will have a couple of dozen instances. I have set it up to use
binary serialization to a single file, which works well. However, I have
learned that changes to my classes break the old serialized files.
While my object model is pretty stable, I am concerned that using binary
serialization will limit the ability to make changes in the future. So, I'm
thinking about adding XML serialization, either as an export option, or as a
replacement for the binary serialization I am using. That way, I can provide
a mechanism for reading prior version data files, even if a binary
serialization would be broken by the changes.
What would you suggest I do? What do you see as the benefits and drawbacks
of each approach? If I go XML serialization, should it be an export option,
or a replacement for binary serialization? Thanks for your help!
Dave Veeneman
Foresight Systems, Inc.