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

Re: Native XML Interfaces

  • From: Uche Ogbuji <uche@ogbuji.net>
  • To: Norman Gray <norman@astro.gla.ac.uk>
  • Date: Mon, 3 Jun 2013 13:42:12 -0600

Re:  Native XML Interfaces
On Mon, Jun 3, 2013 at 1:12 PM, Norman Gray <norman@astro.gla.ac.uk> wrote:
On 2013 Jun 3, at 12:12, Andrew Welch <andrew.j.welch@gmail.com> wrote:

> They could:
>
> - use xquery/xpath
> - use xom/jdom
> - use sax/stax
>
> instead they use a tool to generate an xsd from the xml, then use a
> binding tool to generate some classes, then use those generated
> classes.


o_O

And we wonder why developers come to detest XML!  Who the heck suggests such a Rube Goldberg as the way to go?  The problem statement was "extracting the <title>  and product/@id values from some xml."  That's about 5 lines of code and 5 minutes (admittedly to one who knows it) in Amara, and just to make the point with another toolkit, I bet it's no harder with David Lee's xmlsh.  If we as a community insist on only ever teaching developers difficult ways of dealing with XML, I guess what do we expect?
 

For a while now, I've been involved with a collaboration (to do with astronomy software) arguing about the standardisation of (amongst other things) XML Schemas.

One of the use-cases in those arguments involved generating (Java) classes from XSchema files, but I think this was generally regarded as a rather freaky or marginal use-case, because of the obvious fragility of that approach.  I'm not sure whether even the people pushing that use-case have actually gone down that route.  I think, but I haven't done any census, that a lot of people keep it simple with SAX.

Whatever they did, that or something like it has made the collaboration strongly averse to any schema changes, because 'it breaks things' expensively.  This links back to a recent megathread; I can't help feeling that a parsing layer which is layered on top of SAX will tend to be naturally more robust in the face of minor schema changes, than one based on generated code.

Agreed, but let's admit it.  Callback programming is hard, and most developers don't get it right either, continuing the expensive-breakage problem.

 
Myself, I can see _some_ rationale for generating code from XSchemas, in specialised circumstances, but generally I guess it would be a tooling-rich way to produce large quantities of rubbish black-box code.

+1 "rubbish black-box code" is a great way to describe what XML Schema-driven toolkits tend to produce.


--
Uche Ogbuji                       http://uche.ogbuji.net
Founding Partner, Zepheira        http://zepheira.com
http://wearekin.org
http://www.thenervousbreakdown.com/author/uogbuji/
http://copia.ogbuji.net
http://www.linkedin.com/in/ucheogbuji
http://twitter.com/uogbuji


[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.