What's wrong with XML?
...and why is it so popular?
Is it popular? It's certainly not in short supply. It does seem like you can't open any Java project without encountering XML files, and regardless of how cutting-edge the technology used there - it always seems to bring on some new XML file format.
It does seem popular with framework providers.
But it doesn't seem popular with application builders using the frameworks - if you listen to the rhetoric. Until they have to write a custom config file or interchange file, of course. Then it seems like just the thing. If you listen to the users who have to read and write these config files, though...
In short - XML is a free (crap) parser and serializer/formatter. Which is slightly better for a programmer than no free parser/formatter at all. Programmatic access to XML is very well supported these days and a new config file format can often be supported in minutes by an experienced SAX/DOM/JAXB/whatever programmer.
Which is all bad for the end user because whenever a new file format is needed XML is automatically chosen as the base format.
But writing custom languages without XML is hard, right? I mean - there's ANTLR, but that's complex to learn and hard to get tool support for. Writing a new language in raw antlr is not a task to be done in minutes by a SAX/DOM/JAXB programmer.
See this article for easy to use alternatives.
0 comments:
Post a Comment