Sitting down at a chess board, across the table from an opponent, a contract exists. This contract is that a game of chess will take place, and the rules of chess will be followed by both players. The rules, of course, define the constraints of the game; bishops move diagonally, knights in a 2/1 “L” pattern, white moves first, etc.. Should a player mistake the chess pieces for checkers, and attempt to “jump” another piece, or move a rook diagonally, the constraints of the game have been violated, and chess is no longer being played.

Such is the case on the Internet, with application protocols. When one party opens a connection to another party, a contract is in effect; the contract associated with the TCP port to which an application protocol is bound. As an example, port 80 is for the Web, and any protocol used with it is expected to conform to the uniform interface constraint, meaning that any method being invoked is uniformly applicable to all resources. To not do this, is to play checkers with a chess set. And of course, that’s what Web services are doing.

Another way of looking at this is that most Web services proponents refer to application protocols as transport protocols, which is wrong (most of them are transfer protocols), but explains their tunneling-centric mindset, as they are generally not aware that an application layer contract exists when, for example, you telnet to port 80. Because when you have telnetted to port 80, and are sitting there looking at the flashing cursor, you know what methods you can invoke (OPTIONS, GET, etc..). With Web services, if you telnet to port 80, port 25 (SMTP), or any other, you’re ignoring the existing application contract, and instead count on some separate and different WSDL-defined contract, which you don’t know how to find. Let me repeat and rephrase this, for emphasis; WSDL operations are at the same layer as application protocol methods. And again; HTTP GET is an application semantic, the same as “getStockQuote”.

This is the first step towards understanding Web architecture. Well, it was my first step at least.

Thoughts?