More Simple than XML?

In the programming world, simplicity is king. Well written complex programs should be as simple as the smallest of scripts. To aid in simplicity, programmers have adopted and accepted various standards over the years, while casting away exponentially more standards that fail to aid in the simplistic Utopian of code. One of these standards epitomizing simplicity is XML. Thus, I was surprised to see Al Williams’ blog over at Dr. Dobb’s claiming that the inclusion of XML in embedded systems was a bad idea. What could be more simple than XML?

Mr. Williams cites some good examples involving cross-platform coding and Linux systems in his support his support for simplicity. This makes his example of XML embedded into devices as a concern for a failure to be simple even more confusing. Although any programmer can make a bad use of any technology, it is hard to assume, without specific examples, that what Al saw is actually a bad idea.

Storage

We’ll assume if XML was used to store out a handful of non-standard unrelated information, then perhaps the use of XML was overkill. However, it should be safe to assume that this data was, in some way, related to the device itself. The most likely type of information probably dealt with device information and specs that would need to be communicated with drivers and/or other software interacting with the device. Even if this information was just a few bytes of information, and storing that information in XML doubled the footprint, is that really detracting from simplicity? Wasteful, yes, but how does neatly organizing the data makes things less simple?

Transportation

If the information stored in the embedded device, at some time or another, will need to be transported to another device or system, then what better format to transport data from than XML? If we choose the store the data in a non-XML format, but need to transport it to another device later, then we’d have to add some sort of translation layer to the device to convert to XML or other standardized format. Why not store in the format and save the hassle of building in unnecessary complexities.

Perhaps what Mr. Williams saw was a poor use of XML, but to group all XML in embedded devices as a blow against simplicity seems overkill.

What are your thoughts? Join the conversation, and post your comments here.

Published
Categorized as XML

By Michael Marr

Michael Marr is a staff writer for WebProNews

Leave a comment