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

OXR/OR Mapping Was RE: Native XML Interfaces

  • From: David Lee <dlee@calldei.com>
  • To: Uche Ogbuji <uche@ogbuji.net>, Norman Gray <norman@a...>
  • Date: Mon, 3 Jun 2013 21:30:39 +0000

OXR/OR Mapping Was RE:  Native XML Interfaces

The "problem" of Object mapping is not unique to XML.

It is common nowadays for ORM tools to Relational DB's to be favored, and once learned seems the "natural" way to deal

with any kind of data.    I remember a couple years back working with a co-worker and I was to take over his code,

it had to do a tiny tiny bit of SQL to Oracle (maybe 2 calls - would be about 20 lines of JDBC or so ) so in order to do this the source pulled in about 100 MB of Hibernate runtime.   I asked why he needed hibernate for this and the answer was "I have long stopped writing JDBC in java by hand" ... Now the funny part was this code was doing a bit of XML work as well and he used DOM ...

and my answer to that was xmlsh could do both the SQL AND the XML work in about 1000th the LOC so I told him

"I've stopped writing XML processing  in Java by hand" ...

 

So anyway humor aside ... I am a bit on the fence about this whole  object  mapping thing.

 

What many (most?) programmers are learning/taught is that to deal with any data at all, you use a tool that brings the data into an object in your language, muck with it and write it back out and are saved all the ugly work of having to figure out what is done under the hood.  This is not always a bad paradigm, although I tend to avoid it ... But I can see the temptation.

Especially if you havent had time to learn the whole stack of TechnologyX ... it can seem daunting and "just wrong" to get your hands dirty with the underlying stuff ... that's why there are mapping tools right ?   And it's what "everybody does" so you can't go wrong.

And sometimes it is right ...  ever try to do soap and wsdl without mapping tooling ? (yes I have ... and its possible ...) but its really hard and chances are it won't work without some magic pixie dust only the Microsoft/Sun gurus know about and slipped into the specs at line 4billion305 ...  If your initial experience with XML is like that, or say looking at a Word document ... you may very rightly decide it's not worth it to learn another way when you can just toss a mapping layer on and be on your way.

 

Software has gotten so complicated that most people simply dont have the time in their entire career to learn everything,

so they pick what they want to learn, what their boss tells them to learn and for the rest pick what seems easiest - and if it works you stop there.   And for a lot of people that is not bad or wrong.  The universe of programmers is not what it was 30 years ago.  There is a huge amount of jobs for people to "just" put together pre-built parts.   Expecting everyone to be an expert at everything is unrealistic.

And face it, you *do* have to know XML quite well to use the "simple" tools ... and when to choose them over more complex tools.

When do you pick DOM or SAX or StAX or XSLT or XQuery or xmlsh or XPath or XProc ? To actually make a useful decision on this you actually have to learn ALL of them ... It is daunting ... and if you're not an XML Specialist you are likely to pick the wrong tooling first, find out it doesnt work well for your job at hand ... then what ?

 

Or you toss a mapping layer on top of everything and pretend it's not there and your job gets done before your slip deadlines and get fired.

 

 

-David

 

 

 

 

 

 

 

----------------------------------------

David A. Lee

dlee@calldei.com

http://www.xmlsh.org



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