It's been a few years since I did any Web stuff. Lately I've been skimming through the new open standards from the past 4-5 years.
My ratings, uninformed by significant experience, on a scale of -4 to 10 (anything 0 or less makes me want to bang my head against the wall).
XML: 7. Okay, this isn't new, but it's worth talking about how well it's aged. XML scores huge points for usefulness. In hindsight, some of the design decisions were mistakes. As it turns out, the attention to SGML compatibility was misguided. DTDs and external entity references should have been jettisoned. Entity references such as
é
probably should have gotten the boot, too—get a Unicode-capable editor for crying out loud. CDATA is questionable. Arguably comments should nest, for programmer sanity.XML Schema: 3. The things they decided to implement were implemented with intelligence and taste. But. The spec is unreadable and ugly. It's hard to get a straight answer from it when you have a question. It has so many features that complete implementations are rare. Part 1 alone is 195 pages. Some features depend on XPath, which itself is hard to implement; those features should have been put in a separate, optional module. XML Schema has a lot of features that aren't particularly useful, like
<xsd:notation>
, fixed attribute values, and simple types derived by restriction (other than maybepattern
). It has two of everything, except when it can get away with having three: two different flavors offinal
; two completely different takes on subclassing (derived types and element substitution groups); prohibited substitutions, substitution group exclusions, and disallowed substitutions (which are apparently three slightly different things);nillable
and optional elements.The worst part is, XML Schema doesn't solve the right problems. Validating documents is convenient and helpful. But XML Schema goes far beyond validation to provide a thorough type system for XML. There are two major problems with this: (1) the type system doesn't map to ordinary programming languages or relational databases; (2) no API is provided for programmers to access the type information that's supposedly present in schema-compliant documents.
SOAP: -4. Pointless. Presumably I'm missing something.
WSDL: 9. Everything a standard should be. Purposeful, simple, easy to implement, readable, concise. It loses a point for refering to SOAP. But you can (and should) use WSDL without using SOAP.
No comments:
Post a Comment