XML as an Assembly Language?
June 18, 2006
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?
About
This page contains a single entry from Stefan Tilkov's Random Stuff posted on June 18, 2006 9:38 PM. The previous post in this blog was Ruby Unicode Debate. The next post in this blog is External Halo Effect. Many more can be found on the main index page or by looking through the archives.
Comments
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…
Posted by: Christian Weyer at June 18, 2006 10:49 PM | link
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.
Posted by: Clemens Vasters at June 19, 2006 9:05 AM | link
You are essentially making an argument against any higher-level language abstraction here.
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.
Posted by: Stefan Tilkov at June 19, 2006 9:20 AM | link
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.
Posted by: Clemens Vasters at June 19, 2006 9:49 AM | link
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.
Posted by: Dare Obasanjo at June 20, 2006 12:00 AM | link
