goran at krampe.se
goran at krampe.se
Wed Aug 30 11:20:06 UTC 2006
Lex Spoon <lex at cc.gatech.edu> wrote:
> goran at krampe.se writes:
> > The "client" images then have the exact same code - downloads the
> > ImageSegment and installs it into the image.
> > Net result: The client images need to have the same classes as the
> > server has. As it works *today* that is. I am not saying it couldn't
> > work differently.
> Yeah, this is the main downside of shipping image segments around.
> A simple way to avoid this is to export your data to XML or some other
> semi-structured format before communicating over the network. Then
> you can very well have different versions of the software talking to
> each other. Actually, I find that frequently you do not even need
> explicit versions; if simply ignore unknown message fields, and use
> defaults for missing fields, then your system ends up being naturally
> tolerant against version differences.
Yes, I have written XML import/export for quite an advanced domain model
and given a bit of care this is one nice benefit indeed.
At the same time it can be dangerous to let many versions of a software
"coexist" sharing the same model if you *do* happen to introduce changes
and "fail to realize" that older versions treat it differently.
> Looked at another way, this approach means you are free to change
> around your internal data structures however you like. So long as you
> can produce the same XML messages when you talk on the network, you
> are fine.
But you will most likely still need to force people to upgrade at some
point if the XML needs to change. For example, in the beginning SM1 had
no notion of releases. For an SM1 client to use an SM2 map and still
"work properly" would have been hard while at the same time let the map
format accomodate that change. In short - software can not be backwards
compatible "indefinitely". Naturally. :)
PS. I will move from ImageSegments to XML or some other approach if/when
I get the time to do it. And of course, my offer for people to help
still stands. ;) (yes, Andreas threw together some XML code for SM, but
it still will take hours to get it working and up and running correctly
I am guessing. And if he disagrees I will gladly let him or anyone else
prove it. :))
More information about the Squeak-dev