XML as an Assembly Language?
Clemens Vasters argues that XML is the assembly language of Web 2.0. This is one of the few areas where I thoroughly disagree with him — I’m still convinced that every time you use XML as a low-level implementation detail, you probably shouldn’t have used it in the first place.
One .NET-specific thing I’m skeptical of:
Our WCF [DataContract] doesn’t support attributes. That’s a deliberate choice because we want to enforce simplicity and enhance interoperability of schemas. We put an abstraction over XSD and limit the control over it, because we want to simplify the stuff that goes across the wire.
I understand that if I start with a [DataContract], I will get an attribute-less schema. But how do I use this abstraction when I’m starting with an existing schema?
Of course, the answer is ‘easy’: If you use svcutil.exe (or a better tool…) you should use the /useXmlSerializer switch. And yep, this will revert back to the ‘old’ XmlSerializer OM and engine.
But please do not get me started on this whole story…
You are essentially making an argument against any higher-level language abstraction here.
We’ll detect whether your schema uses attributes and will automatically revert back to XmlSerializer if needed.
I don’t think so; I believe that depends on what you perceive as higher-level here. IMO, the whole point of this WS-Thing (if there is any) is to agree to use something universally supported on the edges (the contracts). If that is too complicated, one should fix the cause, not the symptoms.
Security puts hard limits on “simple”. The same goes for Reliability. These two aspects are what drives most of the complexity in the WS-* stack. The rest is straightforward. People who insist on using XML attributes are making things more complicated for simple interop and alternate serialization.
The things that drives most of the complexity in the WS-* are WSDL and XSD. As for reliability, since WS-* simply gives a facade of reliability as opposed to anything that works for real-world reliability cases I’m not sure how it adds complexity.