Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

For Elliotte Rusty Harold : Overuse of XML?

 
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Someone wrote this,


XML sucks because it's being used wrongly. It is being used by people who view it as being an encapsulation of semantics and data, and it's not. XML is purely a way of structuring files, and as such, really doesn't add much to the overall picture. XML came from a document preparation tradition. First there was GML, a document preparation system, then SGML, a document preparation system, then HTML, a document preparation system, and now XML. All were designed as ways humans could structure documents. Now we've gotten to the point where XML has become so obscure and so complex to write, that it can no longer be written by people. If you talk to people in Sun about their libraries that generate XML, they say humans cannot read this. It's not designed for human consumption. Yet we're carrying around all the baggage that's in there, because it's designed for humans to read. So XML is a remarkably inefficient encoding system. It's a remarkably difficult to use encoding system, considering what it does. And yet it's become the lingua franca for talking between applications, and that strikes me as crazy.


Would you like to comment on the above quote by relating to your book for some pointers for balance in the use of XML?
Is there a situation when we abandon XML and use plain text?
Best Regards
 
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A great advantage of XML is its storage capibility and most of the language nowadays has their own API to deal with it... The most comfortable point of XML is the name and value pairs, which cannot be done in plain text...
BTW, where did u find that quote? Maybe he/she does not have enough ability to deal with XML. That's why he/she said "XML sucks"...
 
author
Posts: 91
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The quote is from Dave Thomas (the pragmatic programmer, not the hamburger pitch man) in an interview he did with my friend Bill Venners at artima.com last May. It was a quote of the day on Cafe con Leche last August.
 
Elliotte Rusty Harold
author
Posts: 91
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you read the entire interview, Thomas is not nearly as negative about XML as this quote implies. His main complaint is that it's not human readable and writable enough, and if you look at hideous examples like SVG and InkML, he's right. The problem in both cases is not using enough markup. Both SVG and InkML shove lots of numbers into an element without any markup to indicate what those numbers are. In essence, they've wrapped tags around a bunch of unstructured data and called it XML. SVG, in particular, gets called out for special calumny in Effective XML as an example of ineffectiuve design. Certainly I agree with Thomas that there are right ways and wrong ways to use XML. If there were only right ways, we wouldn't need a book like this.
I suspect where I part ways with Thomas is that I don't find well written XML to be all that opaque. In fact, I think it's a lot less opaque than traditional formats like tab delimited text files or binary encodings. I do think Ant build files are a lot easier to read than make files, and also vastly easier to debug. XML is marginally harder for humans to write than looser formats like HTML and SGML, but it's so much easier for machines to parse that I think it's a net gain for usability. There are good reasons programmers don't store config files in HTML, SGML, or ASN.1; and these reasons have a lot more to do with the quality and usability of the available tools than anything else. XML makes it easier to write good tools. Theoretically SGML, ASN.1, XML and even S expressions may be isomorphic. Practically, however, life is a lot easier with XML than it is with any of the alternatives.
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just like any other technology, its important to realize that there are times when XML should not be used. Its laying the old saying, "If you have a hammer everything looks like a nail". I talk a little about this at:
Use XML Design Pattern
 
What a stench! Central nervous system shutting down. Save yourself tiny ad!
We need your help - Coderanch server fundraiser
https://coderanch.com/t/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic