Using SM

Lex Spoon lex at cc.gatech.edu
Wed Aug 30 08:15:58 UTC 2006


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.


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.


-Lex


PS -- When I say "export to XML", I do not mean to use automatic tools
that just happens to use XML somewhere.  I mean writing conversion
routines that save exactly the information you want to export.




More information about the Squeak-dev mailing list