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

RE: XML Schema: "Best used with the ______ tool"

  • From: "Michael Kay" <mike@s...>
  • To: "'Dennis Sosnoski'" <dms@s...>
  • Date: Fri, 28 Nov 2008 12:21:49 -0000

RE:  XML Schema: "Best used with the ______ tool"
> Current generation data binding tools unmarshal and marshal 
> as fast or faster than just building or serializing a DOM, 
> and access is much faster and easier than using XSLT or 
> XQuery to access data from said DOM. Have you actually tried 
> any comparisons? Even back six years ago my JiBX data binding 
> was faster than the best of the DOM-type models (dom4j), as 
> discussed in this article: 
> http://www.ibm.com/developerworks/xml/library/x-databdopt2/ 
> Data binding also generally uses much less memory than a DOM 
> model, because only the data values are represented rather 
> than all the details of the XML structure. As for validation, 
> it is rarely used in production systems due to the large 
> performance overhead.

I don't have any performance data, and I would love to see some. But XSLT
and XQuery processors also use tree representations that are much faster and
smaller than a DOM (in one recent Saxon measurement, 40% of the size, 40%
faster to build, and 30 times faster to navigate), and I don't think there's
any intrinsic reason why they should be slower than data binding. I'm not
saying they are faster, just challenging your assertion that they are
impossibly slow - I think the burden of proof is on you.
> 
> XQuery may be usable when you only need a few selected items 
> of data from the documents, but it's not a realistic approach 
> when all the data in the document is actually used by the application.

Why?
> 
> 
> For most web services applications the Java (or other programming
> language) representation is actually primary, and XML is just 
> being used for interchange. 

I don't think it matters which is primary, the complexity comes from having
two representations and keeping them aligned. But I would have thought the
format used for data interchange is primary in the sense that it needs to be
agreed with other parties, whereas the Java representation is under local
control. (Unless of course you're running the same code at both ends, in
which case I'm not sure why you're using XML at all.)

> Do you seriously expect 
> developers to go back to creating DOM representations from 
> their data structures, and vice versa?

Good lord, no! DOM should be allowed to die an undignified, lonely and
miserable death. But I also think that business logic should be written in
4GLs not in 3GLs - 20 years ago we seemed to be more advanced in recognizing
that than we are today.

Michael Kay
http://www.saxonica.com/



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


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.