The Artima Developer Community
Sponsored Link

Java Community News
Brett McLaughlin: What is XML Really Good For?

81 replies on 6 pages. Most recent reply: Mar 8, 2007 3:37 AM by Antti Tuomi

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 81 replies on 6 pages [ 1 2 3 4 5 6 | » ]
Frank Sommers

Posts: 2642
Nickname: fsommers
Registered: Jan, 2002

Brett McLaughlin: What is XML Really Good For? Posted: Feb 20, 2007 3:10 PM
Reply to this message Reply
Summary
In an IBM developerWorks article, O'Reilly author and editor Brett McLaughlin questions several of the common uses of XML in enterprise applications, and invites his readers to ponder what XML is really good for.
Advertisement

In books such as O'Reilly's Java and XML (now in its third edition) and Java and XML Data Binding (2002), Brett McLaughlin has already offered plenty of advice on how to use XML in enterprise Java applications. Now McLaughlin is asking his readers to ponder not how to use XML, but why to use it.

In What's XML really good for?, published on IBM's developerWorks site, McLaughlin points out that XML has been around long enough to no longer be a technology that developers use just because it's in vogue. Instead, developers should think hard about the areas of an enterprise application where XML is a good fit—and possibly avoid using XML when other technologies could provide simpler solutions:

The jury is still out on XML's "killer application"—the ultimate usage of the data format that seems to justify its creation. As you look at some of the most common usages in this article, you'll quickly see that even experts disagree, and XML can be used—or not used—in lots of different applications.

McLaughlin looks specifically at two areas where XML is commonly used: As a configuration file format, and as a data interchange format. In both cases, simpler solutions would often suffice, according to McLaughlin.

Where do you think XML is really a good fit in an enterprise application?


Ivan Lazarte

Posts: 91
Nickname: ilazarte
Registered: Mar, 2006

Re: Brett McLaughlin: What is XML Really Good For? Posted: Feb 20, 2007 3:40 PM
Reply to this message Reply
Data, and describing data obviously. I believe its met its goal very well. I think a lot of people find fault with it, or constantly look towards alternatives, because it's not the easiest technology to integrate with in terms of programming language. Is this another impedance mismatch similar to the OO/R issue? Maybe.

In terms of speed, parsing and processing, I suppose that might be a major concern at some point if you deal with a lot of data, but if it's a really strong concern, I can see reverting to a CSV-ish mechanism for bare minimum wasted on data structure.

To me, What's really the draw to an alternative format like JSON? It's neither as well positioned as xml, nor does it offer the minimalism of a csv. It seems like "eval" is it. "I can just eval within my dynamic language".

XML can be validated, it is easily readable, the tools are setup, I'm very happy with it.

robert young

Posts: 361
Nickname: funbunny
Registered: Sep, 2003

Re: Brett McLaughlin: What is XML Really Good For? Posted: Feb 20, 2007 6:48 PM
Reply to this message Reply
After all this time, it still amazes me that folks *still* say that XML is "self-describing". Only a little bit, and only if you speak the (human) language it is written in.

So, what does this mean:

<asdlkfj>
kkkkkk
</asdlkfj>

And how is it to be processed? Whatever you say; I say you're wrong, I will make it so.

And even then, you still need to; get a parser, parse, and write YourProgram to act on the data. XML files do none of those things. As McLaughlin tip-toes around: YourProgram is all you need (and a simpler one at that) if you use properties or csv data files.

A RDBMS catalog is meta-data. Gad.

People, GML is from IBM reporting utilities of the 1960s. The only difference is angle brackets. troff and nroff derive from the same.

If you intend to print a document with Italic here and WingDing there, then any of these techniques are useful. But for nothing else.

Ivan Lazarte

Posts: 91
Nickname: ilazarte
Registered: Mar, 2006

Re: Brett McLaughlin: What is XML Really Good For? Posted: Feb 20, 2007 7:16 PM
Reply to this message Reply
xsd.

Mark Thornton

Posts: 275
Nickname: mthornton
Registered: Oct, 2005

Re: Brett McLaughlin: What is XML Really Good For? Posted: Feb 21, 2007 1:24 AM
Reply to this message Reply
It is easily better than all the alternatives for transferring geographic information (between different applications, organisations). The structure is useful here and also the character encoding. Most of the alternatives have problems with characters that don't fit in a single byte (and/or don't declare the character set used within the data, instead relying on passing that on a separate scrap of paper).

V.H.Indukumar

Posts: 28
Nickname: vhi
Registered: Apr, 2005

Re: Brett McLaughlin: What is XML Really Good For? Posted: Feb 21, 2007 3:55 AM
Reply to this message Reply
It seems that most people cannot get over the fact that XML is verbose. So what? It does not stop me from doing interesting things with it. It has namespace support, it has SAX, it has DOM, both of which are well known standards, it has XPath, it has extensive editor support, it has DTD/XSD, it is simple to read (verbose, but simple), it is understood by a large amount of people, and most important of all, it is supported in virtually all environments. What more do you want? Give me a data format that has all these features and then I will switch! Until then, I will suffer the verbosity of XML gladly.

Achilleas Margaritis

Posts: 674
Nickname: achilleas
Registered: Feb, 2005

Re: Brett McLaughlin: What is XML Really Good For? Posted: Feb 21, 2007 4:10 AM
Reply to this message Reply
XML is easy to parse, and that's about it.

Dave Webb

Posts: 55
Nickname: lazydaze
Registered: Feb, 2006

Re: Brett McLaughlin: What is XML Really Good For? Posted: Feb 21, 2007 4:54 AM
Reply to this message Reply
Irrespective of whether it's the optimal solution for anything, XML has enabled a lot of things to happen that never happened before simply because it's good enough and it's common currency. Similarly, there might be better protocols than TCP/IP, but it doesn't matter anymore.

Frank Silbermann

Posts: 40
Nickname: fsilber
Registered: Mar, 2006

Re: Brett McLaughlin: What is XML Really Good For? Posted: Feb 21, 2007 6:18 AM
Reply to this message Reply
It is good for encoding data that is complex enough to require a context-free grammar to understand, but which is not so often hand-coded that it's worth applying compiler technology such as lex and yacc.

In other words, it's for situations in which the Interpreter design patter makes sense, but you're willing to put up with a somewhat ugly notation if it makes development easier.

James Watson

Posts: 2024
Nickname: watson
Registered: Sep, 2005

Re: Brett McLaughlin: What is XML Really Good For? Posted: Feb 21, 2007 6:41 AM
Reply to this message Reply
> Data, and describing data obviously. I believe its met
> its goal very well. I think a lot of people find fault
> with it, or constantly look towards alternatives, because
> it's not the easiest technology to integrate with in terms
> of programming language. Is this another impedance
> mismatch similar to the OO/R issue? Maybe.

It's not as hard as people make it out to be. I think the problem is that most (all?) OO languages cannot describe the complex structures possible in XML without executable code. This is the impedance mismatch. But viewed from a XML-centric perspective, the problem is easy because the OO structures are so simplistic. Transforming to them with a XML specific language like XSL is generally trivial.

In terms of the overall topic. I think XML is really good at describing data. It when people start defining complex languages within XML that I start to question the logic.

James Watson

Posts: 2024
Nickname: watson
Registered: Sep, 2005

Re: Brett McLaughlin: What is XML Really Good For? Posted: Feb 21, 2007 6:51 AM
Reply to this message Reply
I just read the article. He doesn't really say much of anything. There's really very little difference between configuration and data transfer in terms of how the documents are used. They are both data. He doesn't even mention the use of XML to represent process logic (e.g. BPEL.)

Michael Hobbs

Posts: 51
Nickname: hobb0001
Registered: Dec, 2004

Re: Brett McLaughlin: What is XML Really Good For? Posted: Feb 21, 2007 7:32 AM
Reply to this message Reply
Ummm... this is a wild guess, but I'd say that XML is really good at marking up text documents. Hence the term, Markup Language.

James Watson

Posts: 2024
Nickname: watson
Registered: Sep, 2005

Re: Brett McLaughlin: What is XML Really Good For? Posted: Feb 21, 2007 7:41 AM
Reply to this message Reply
> Ummm... this is a wild guess, but I'd say that XML is
> really good at marking up text documents. Hence the term,
> Markup Language.

And a 'head-shop' is a place where heads are sold.

Michael Hobbs

Posts: 51
Nickname: hobb0001
Registered: Dec, 2004

Re: Brett McLaughlin: What is XML Really Good For? Posted: Feb 21, 2007 10:34 AM
Reply to this message Reply
Honestly, have you ever considered other structured data formats for storing or transmitting data? ("structured" excludes .ini files and property files) Specifically, have you ever compared XML against ASN.1, JSON/YAML, s-expr, XDR, etc? Aside from the fact that there are 300 XML libs for every platform, XML never provides any technical benefit. The reason is that it was designed as a Markup language (for text), not an Interchange language (for data).

For example, with XML, it's ambiguous if you should put a value in an attribute or as text content:
<first-name value="Chuck"/>
<first-name>Chuck</first-name>

The reason it's ambiguous is the designers didn't design it to be a data interchange language. As far as they were concerned, if you wanted "Chuck" to show up in the rendered text, you put it in as text content. If "Chuck" is just a property of the markup, you put it in as an attribute.

With a data interchange file, there is no rendered text, which is where the ambiguity comes from. (i.e., you're trying to do WHAT with my markup language?)

nes

Posts: 137
Nickname: nn
Registered: Jul, 2004

Re: Brett McLaughlin: What is XML Really Good For? Posted: Feb 21, 2007 10:48 AM
Reply to this message Reply
> > Ummm... this is a wild guess, but I'd say that XML is
> > really good at marking up text documents. Hence the
> term,
> > Markup Language.
>
> And a 'head-shop' is a place where heads are sold.

Michaels comment sounded a bit simplistic but was exactly my thinking. XML syntax is good for what it was originally created. XML comes from SGML which comes from GML and its purpose was:

GML simplifies the description of a document in terms of its format, organization structure and content parts and their relationship, and other properties. GML markup (or tags) describe such parts as chapters, important sections, and less important sections (by specifying heading levels), paragraphs, lists, tables, and so forth. [http://en.wikipedia.org/wiki/Generalized_Markup_Language]

SGML was originally designed to enable the sharing of machine-readable documents in large projects in government, legal and the aerospace industry, which have to remain readable for several decades—a very long time in information technology.
[http://en.wikipedia.org/wiki/SGML]

XML is for documents. Why everybody wants to stuff all data into text documents nowadays is beyond my comprehension.

Flat View: This topic has 81 replies on 6 pages [ 1  2  3  4  5  6 | » ]
Topic: Martin Fowler Takes ANTLR for a Test Drive Previous Topic   Next Topic Topic: Desklets for Java

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use