My recent post on types got this comment (possibly a hoax) from someone who thought I was saying that I didn't like XML's lack of OO constructs. In fact, that's what I love about XML. If anything, I wish I could convince more people to stop thinking of XML as a “just a serialization syntax for objects” and embrace it - and the tools that come with it - as a powerful way to model and manipulate data.
Another recent comment (about for this post) expressed surprise that I design my Web services starting with the structure of the XML messages. The poster wanted to know why I didn't just design an object model for my problem domain and let the angle brackets fall where they may. The answer is easy: I don't think it will work. If the last 10 years have taught me anything, it's that you have to know how your distributed technology works if you want to have any chance of success. Think how much people know about the syntax and semantics of HTTP headers and HTML bodies. Why do we think we don't have to know anything about the XML we're putting into messages? And, more concretely, why are we surprised when interop, versioning and other problems crop up?
None of this means that I don't want to program using objects. It just means that I start by designing XML, then XSD, then WSDL, then I layer on classes using a very stylized coding style. At runtime, my code mixes XML techniques and object techniques, depending on my needs. Maybe someday I'll have tools that do exactly what I want and need on the wire and I won't have to work bottom up. But to my mind, at least, they're not there yet.
Posted
Jul 23 2004, 05:36 PM
by
tim-ewald