Re: SOX: was Re: XML and Objects

Bill la Forge (b.laforge@jxml.com)
Thu, 1 Oct 1998 20:06:41 -0400


From: Peter Murray-Rust <peter@ursus.demon.co.uk>
>I don't necessarily think we are limited to Java, though I think that will
>be the main thrust. From my perspective the client gets at XML element and
>needs to do something with it. There is no requirement that a particular
>element is always treated by the same code, any more than (say) there is a
>universal HTML client.

I would say that it depends.

If the document was produced by serializing a graph of objects and you are
intent on recreating that graph of objects, then you want to use the same
classes. Though for this, the markup language used will likely include a
simple means of determining which classes to use.

Similarly, when there is a common class used by everyone who uses
a particular markup language, it is best to use that class. I believe that
this will mostly be the case for passive objects specialized at converting
between the XML form of the data and the internal form. These conversions
may be quite complex for some specialties. (Ever look at the tag structures
used by the Library of Congress? I worked 5 years at Penn State University
Library and have not since seen anything a tenth the complexity!)

In both of the above cases, there may still be occasions when a non-standard
mapping may be desired.

Now lets look at the other extreme--the document describes a request or
action
to be performed and is being processed by the server which will handle that
request.
The request conforms to a particular markup language. This means that
the system making the request can be understood by the system that must
process the request.

The point is that the requestor doesn't know how the server is going to
handle
the request. So there is no presumption of class mapping.

Further, over time the architecture of the server may change, necessitating
a
change in class mapping. But the markup language need not change.

What I like about XML is that it facilitates n-tier and peer-to-peer
interactions
by placing the emphasis on a well-designed markup language which is
descriptive rather than proceedural.

Bill