[ODE] File formats, was Re: .NET wrapper

Nate W coding at natew.com
Mon Jan 27 22:32:01 2003


On Tue, 28 Jan 2003, David Walker wrote:

> I too had been thinking about a file format to store this kind of
> information. The way I was leaning was towards using the .NET
> serialization features.

The cool thing about the .net serialization is that it's really easy to
get an application loading and saving files.  The drawback is that the
stuff that makes it easy (reflection) means you get a file format that's
tightly coupled to the application data structures.  That makes it a pain
in the butt to make changes to either one.  

For example, if you later decide to have a base class that contains
members shared by two unrelated classes, you can't load old files without
special code to map SomeObject.Position.X to NewbaseClass.Position.X, for
example.  If you want to write a new application from scratch, using a new
object model, you'd have to go through a lot of contortions to load files
that basically mirror the old object model.

It's possible to do serialization under .Net without the reflection stuff,
but then you lose some of the advantages that make reflection-based
serialization so attractive in the first place. :-)

-- 

Nate Waddoups
Redmond WA USA
http://www.natew.com