Doug Purdy at Applied XML Dev Conf

Day 2

Doug Purdy from the Indigo team is talking about versioning web services. 

He mentioned it was his birthday today, and Chris Anderson led the room in a rousing rendition of “Happy Birthday.”  BTW — Chris has a good signing voice…who knew?

About 3 slides into his presentation Doug suddenly showed a picture of a submarine he must have borrowed from Whit Kemmey’s Naval Missile XML presentation.  He also showed a very scary picture of Don Box and promised to post it on his blog.  Content aside, this is the funnest talk of the day so far.

The first part of his talk is about behavioral contract versioning.  As a classic OO programmer, this is the familiar stuff to me:  like in COM or .NET you can add certain types of things without breaking compatibility, other times you have to create a “2” version of your contract as in IPeopleManager and IPeopleManager2.

The more interesting part is the concept of a Data Contract.  The basic problem is how do you send strongly typed data between programs and version the types.  Traditionally the answers have involved loose contracts:  passing strings or XML schemas with open content models.  A “Data Contract” describes explicitly how the class looks as data independent of its representation or programming interface.  As long as two classes have the same data contract, regardless of version or implementation, they can be transmitted between systems in a non-breaking way.  You can also extend the data contract and the new elements can be ignored by the old version.  One of the tricks is how to map this to an xsd schema, but Doug showed a simple way to create the base schema, followed by a VersionDelimiter element, and then add the version 2 members of the data contract there.

I spent years working with converters for different versions and formats for CAD data.  The data contract idea is the nearest I’ve seen in the world of web services to the table-driven converter architectures we used.  Beyond that, I’d suggest looking at Doug’s blog.


Comments (0)

Skip to main content