Book Review: Effective XML
- By Mike Gunderloy
- December 20, 2004
Effective XML: 50 Specific Ways to Improve Your XML
by Elliotte Rusty Harold
Addison-Wesley, 2004
304 pages, $44.99
Code in XML
XML has become the universal repository of information for many applications,
replacing INI files, databases, the Registry, and sundry other storage
mechanisms. It's a rare developer who hasn't had to learn about attributes and
elements and tags. This may be just a temporary phase, as sophisticated IDEs and
programming tools abstract away the XML syntax and let developers work at a
higher level. But I have to be in a really optimistic mood to think that we can
actually escape angle brackets any time soon. In reality, most of us are doomed
to get our hands dirty in the XML trenches for the forseeable future.
That's where this book comes in. A long-time veteran of XML standardization
efforts and figuring out how to apply XML in the real world, Harold offers fifty
best practices here that developers would be wise to follow. The book is
refreshingly straightforward, and the author isn't afraid to say bed things when
necessary - about vendors, standards bodies, and even his own previous writings
where he was still figuring out how to do things right. That's a good reminder
that you shouldn't take this book as the final word on the subject. But it's
going to be a lot closer to the final word than most of us have progressed so
far.
The book is organized into four sections of increasing complexity. The first
covers basic syntax. Even here you'll run into some rules that may surprise you
- for example, Harold urges you to avoid XML 1.1 except in a few very, very
specific situations. DTDs and element naming are among the other topics in this
section. Part 2 looks at the structure of XML files, and counsels you on things
like choosing a schema language, using namespaces, and allowing all XML syntax
in your files (SOAP comes in for particular criticism here). Part 3 deals with
the semantics of XML, and looks at the layering of functionality among the
various XML standards. This is a great read if you're still struggling to get
the big picture. Part 4 is titled "Implementation," and deals with issues such
as preprocessing, XML digital signatures, and avoiding vendor lock-in.
As the author points out, the heap of XML standards we now have threatens to
surpass SGML in complexity. It's pretty easy to find your way into this forest,
since basic XML is so simple. But if you're stuck there, looking for a way out,
this book is a must-have.
About the Author
Mike Gunderloy has been developing software for a quarter-century now, and writing about it for nearly as long. He walked away from a .NET development career in 2006 and has been a happy Rails user ever since. Mike blogs at A Fresh Cup.