Monday, October 24, 2005
Loose Coupling / Service Browser
Steve suggests I read the thread on Ted's blog -- another mega comment thread.
OK, in this one -- which is mainly centred on loose coupling -- I pretty much agree with all of Michi's points. I don't think that a restricted number of verbs provides better scalability per se, however there are other reasons to bend toward the REST approach. Having a convention whereby it is simple (and by this i mean *trivial*, no parsing of content/body) for intermediaries (ie proxies) to determine the cachability of a message is useful -- of course HTTP has several other mechanisms specifically for this.
The other major reasons to use REST style, imho, are debugging are portability. Debugging because you can use a browser to view the state easily -- provided all context can be provided in the URL. Portability in terms of, I can send URLs easily in an email, no explanation is necessary; I can send a link to a user / another team and no setup or extra software is needed. This, while not directly needed is *very* useful in an enterprise / cross team scenario.
What would make the WS world much easier would be a service browser -- this may exist, I've been out of the world for a litle while. The service browser would have as it's goal, making access of a WS as easy as a web page in a normal browser. Most toolkits will build a test web page on the server side for this type of testing, however:
OK, in this one -- which is mainly centred on loose coupling -- I pretty much agree with all of Michi's points. I don't think that a restricted number of verbs provides better scalability per se, however there are other reasons to bend toward the REST approach. Having a convention whereby it is simple (and by this i mean *trivial*, no parsing of content/body) for intermediaries (ie proxies) to determine the cachability of a message is useful -- of course HTTP has several other mechanisms specifically for this.
The other major reasons to use REST style, imho, are debugging are portability. Debugging because you can use a browser to view the state easily -- provided all context can be provided in the URL. Portability in terms of, I can send URLs easily in an email, no explanation is necessary; I can send a link to a user / another team and no setup or extra software is needed. This, while not directly needed is *very* useful in an enterprise / cross team scenario.
What would make the WS world much easier would be a service browser -- this may exist, I've been out of the world for a litle while. The service browser would have as it's goal, making access of a WS as easy as a web page in a normal browser. Most toolkits will build a test web page on the server side for this type of testing, however:
- you'd normally only deploy it in a dev environment,
- you can't keep a number of 'bookmarks'; it's not portable -- can I send a sample in an email?
- multi-stage / stateful interactions generally don't work or are very difficult to arrange
- authentication is typically not supported, unless inline to the message (eg HTTP auth / cookie redir schemes won't typically work)