Print

Just Say No to XML



Email
September 1, 2006 —  (Page 1 of 3)
XML is perhaps the worst programming language ever conceived. I’m not talking about XML as a data-description language, which was its original design. I’m talking about perverting XML for programming applications. It’s inappropriate to use XML as a scripting language (e.g., ANT), a test-description language (e.g., TestNG), an object-relational mapping language (e.g., Hibernate, JDO), a control-flow language (e.g., JSF), and so forth. These sorts of XML “programs” are unreadable, unmaintainable, an order of magnitude larger than necessary, and audaciously inefficient at runtime.

So, why would anybody use XML in this bizarre way? As far as I can tell, it’s because many so-called programmers just don’t know how to build a compiler. I really don’t have much patience for this sort of thing. To my mind, there is a minimum set of topics with which you have to be conversant to call yourself a professional programmer. If you don’t know these things, you’re a dilettante. This list includes a deep understanding of data structures and key algorithms, a little math (set theory, logic, a little statistics), mastery of analysis-and-design techniques, both process (e.g., RUP or XP) and structure (e.g., design patterns), and database structure and use (e.g., SQL). You also need to know how the hardware works.

You need this stuff even if you’re not actually using it in your work, because no matter what you’re doing, knowing this material will make your work better. How could you possibly decide which of Java’s Collection classes to use in a particular situation if you don’t know how those classes work under the covers, for example?

Knowing how to build a compiler is certainly one of the skills on this need-to-know list. Compilers are fundamental to what we do every day as a programmer. Knowing how the compiler works will let you make intelligent decisions about program structure, decisions that have real impact on the quality of our programs. More to the point, most programs have to parse input (either from a human being or from a machine) and make sense of it. To do that, you have to build a small compiler. Corrupting XML for this purpose, simply because you happen to have an XML parser lying around, is inappropriate at best.




Pages 1 2 3 


Share this link: http://sdt.bz/29508
 

close
NEXT ARTICLE
MicroXML: The future of XML?
MicroXML has been proposed as a simpler alternative to XML, but is XML sufficiently complex to warrant a new language? Read More...
 
 
 




News on Monday  more>>
Android Developer News  more>>
SharePoint Tech Report  more>>
Big Data TechReport  more>>

   
 
 

 


Download Current Issue
APRIL 2014 PDF ISSUE

Need Back Issues?
DOWNLOAD HERE

Want to subscribe?