Moving objects... (serialization)
Peter Smet
peter.smet at flinders.edu.au
Tue Jul 27 01:17:26 UTC 1999
Marcel,
This is very interesting. So each language would have some implementation of
#instantiateFromXMLStream? Is that how it would work? Could you explain a
bit about how XML would deal with issues like:
Moving behaviour. A class is not an Object in C++ or Java. How does XML
serialize classes in C++ and Java? Could these then be understood in a
language like Smalltalk?
What about class methods, class variables, static variables etc. What
happens if my Java XMLreader comes across a Smalltalk class object, can it
cope with this? What about my serialized block object, anonymous inner
classes etc? These are all language impedance mismatches, where you have a
concept in one language, which does not exist in another.
Big Endian vs little endian - marshalling stuff.
Versioning. A class is changed, and then an old version of the class is read
in from an XML stream - the old instance variables don't match the instance
variables of the new class definition..
I really like the idea of being able to view and manipulate serialized
Objects in a standard way, without them having to be instantiated into their
native form first.
Peter
From: Marcel Weiher <marcel at system.de>
>I've been looking at cross-platform serialization for a while now
>and seriously believe that XML is the way to go here. XML coding is
>simple, standardized, self-describing, human readable, etc. Standard
>XML mechanisms can be used to describe object-references, even to
>objects not within the same file and can even express the difference
>between fetching the target of such a reference immediately or via
>proxy if referenced (SqueakPages?).
>
>One of the implications of XML as a serialization format is that you
>do not need to have the actual objects in order to understand,
>display, modify a serialized representation. As a matter of fact,
>purely syntactical tools such as XSL or even grep and vi can be used
>to search or transform such formats. The serialization format can
>also be close enough to standard XML-based formats that
>conversion/encoding is a trivial extension to serialization.
More information about the Squeak-dev
mailing list
|