[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: XML-with-datatypes (was....)


Re:  XML-with-datatypes (was....)
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.

-- 
Elliotte Rusty Harold  elharo@m...
XML in a Nutshell 3rd Edition Just Published!
http://www.cafeconleche.org/books/xian3/
http://www.amazon.com/exec/obidos/ISBN=0596007647/cafeaulaitA/ref=nosim

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.