[
Lists Home |
Date Index |
Thread Index
]
Title: RE: [xml-dev] XML-with-datatypes (was....)
And it introduces proprietarization, a force which
disables the ability of the owner/customer to negotiate
and control costs. OTOH, the advantage of welding types
to the language is to deproprietarize it (it's a standard),
but that introduces brittleness. XML as a syntax standard
is the low common denominator because it is the easiest
agreeement to define even if the substance of it (eg,
namespaces) has known flaws. The surprise to some was
just how much interoperability could be achieved with
a semantic-less standard. Are we sure we know where
the limits of that are?
A refactorization of XML that focused on fixing the
known syntax problems (layering) without introducing
another layer is welcome. Welding in datatypes is
precisely the kind of unwelcome change one wants to
avoid. (Vladimir: I'm not saying what you are
suggesting is ridiculous. I don't see the advantage
of moving the namespace to core, but please keep
that discussion going.)
Elliotte, please explain why JAXB 2.0 and Apache Commons Digester
are improvements with respect to strong typing.
len
From: Elliotte Harold [mailto:elharo@metalab.unc.edu]
Michael Champion wrote:
> XSD has few loyal friends in the
> trenches AFAIK, but the idea of having to deal with the hassles of
> comparing dates, floats, etc. as strings, or tediously converting them
> to programming language datatypes one by one, and learning XPath/XSLT
> in order to handle arbitrary variations in data structure, is even
> worse. In my heart of hearts I think they would be better off if they
> *did* learn all this wonderful, open, XML stuff, but the fact seems to
> be that they would prefer to just map it to objects as quickly as
> possible. "It's a price in an invoice, don't make me deal with it as
> a node in a tree!!" is their complaint against untyped XML. By binding
> to objects, they get the benefits of XML
> (vendor/platform/application-neutrality, the network effect, etc.)
> without the costs of diving into all the confusion and complexity that
> we somewhat happily wallow in.
>
This completely misses the point. Weakly typed XML can absolutely be
bound to objects. The difference is that everyone gets to choose which
objects to bind to depending on what makes sense to them in their
environment. Strong typing says everyone has to use the same objects,
and interpret the dates/floats/integers/etc. in exactly the same way.
But we aren't the same. We aren't using the same platforms and tools. We
don't need to do the same things. We all need different, unique classes
and data structures. XML lets us have that.
Most data binding frameworks still believe in the Highlander principle
of schema design (There can be only one!) but a few are starting to move
in the direction of allowing a lot more local flexibility because
they've been around long enough to realize that strong, static typing is
brittle and inflexible; and to see that systems that solve real problems
need to be a lot more open and flexible. JAXB 2.0 is a big improvement
on JAXB 1.0 in this respect. Apache Commons Digester is also a very
interesting approach. Neither is fully there yet, but it's obvious which
way the tide is flowing.
|