Article Discussion
Plain Text and XML
Summary: Pragmatic Programmers Andy Hunt and Dave Thomas talk with Bill Venners about the value of storing persistent data in plain text and the ways they feel XML is being misused.
19 posts on 2 pages.      
« Previous 1 2 Next »
The ability to add new comments in this discussion is temporarily disabled.
Most recent reply: July 18, 2003 9:52 AM by Matt
Todd
Posts: 27 / Nickname: tblanchard / Registered: May 11, 2003 10:11 AM
Re: Plain Text and XML
May 28, 2003 3:14 PM      
> Of course there are instances where XML is misused, abused
> or simply a bad choice. Ant build files are one example.

This isn't that bad of a use I think.

> Apple's plist format is another.

Yes - the text only version of these (NextStep classic style plist) - is what I routinely use to pass around structured data as text. The XML-ization of this format achieves buzzword compliance at the expense of readability and size.

> The crux of the problem we are facing is that programmers
> do not create easily parsed, simple data formats easily

But they only bother to create them in the absence of something already working. I have seen no homegrown syntaxes on NextStep/Cocoa systems because its trivial to serialize/deserialize arbitrary collections of strings.

XML filled a void - but to borrow your analogy, the void was round and XML is roughly triangular. So its usually a bad fit.

> Swinging back from XML to text/yacc isn't a magic bullet,
> and won't solve any problems in and of itself.

No, but a much simpler serialization format would go a looong way towards eliminating the hated homegrown syntaxes. I've got classic plist parser/serializers for ObjectiveC, Java, and Smalltalk. They take about a page of code and have amazing power. I don't see anything in 90% of XML that this mechanism doesn't do better in every way.

I think XML in general is just overhead and I avoid it whenever possible.
Steven
Posts: 2 / Nickname: situboo / Registered: July 17, 2003 9:14 AM
Re: Plain Text and XML
July 17, 2003 2:00 PM      
I've been following this critism of Ant for sometime now. I find it ironic that the point of illegibility made against it contradicts one of the reasons I have suggested folks use it. How it in effect becomes a document to the build process and I don't have to go to someone in a SCM group to understand how the application is built. Where is the problem? Being dependent on the java program that consumes it?
Steven
Posts: 2 / Nickname: situboo / Registered: July 17, 2003 9:14 AM
Re: Plain Text and XML
July 17, 2003 2:04 PM      
I agree. I've heard this critism of Ant for sometime now. I find it ironic that the point of illegibility made against it contradicts one of the reasons I have suggested folks use it. How it in effect becomes a document to the build process and I don't have to go to someone in a SCM group to understand how the application is built. Where is the problem? Being dependent on the java program that consumes it?
Matt
Posts: 62 / Nickname: matt / Registered: February 6, 2002 7:27 AM
Re: Plain Text and XML
July 18, 2003 9:52 AM      
Hmm, I don't see the irony (maybe Alanis Morissette would, though).

Is the argument here that XML files are "documents" whereas other (possibly more legible) files are not?

Wouldn't it be better to have a crisp and clear build-file syntax which was much more tailored to a build process that could also generate an XML file output?
19 posts on 2 pages.
« Previous 1 2 Next »