Greg Reinacker posted some interesting comments in his weblog about Interface Uniformity:
You can retrieve anything the same way, but you can't process it without knowing more specifically what it is. And while it's nice to have an interface that is essentially type-less [...], it's not as nice if the returned types can't be coerced into something you can use.
This is the point that has bothered me about the whole REST concept right from the start of all the "REST is Best" debates. HTTP GET does not provide a true application-to-application protocol because it is always dealing with generics.
Once you get the contents of the resource you just retrieved with a HTTP GET request, what do you do with it? In the normal case of a web page, the contents are given to a browser program to render the contents as HTML, or a JPEG image, or whatever the appropriate rules defined for rendering that specific content type. The "application protocol" in this case really lies with the browser and HTML rather than the underlying HTTP level interaction. Without this "application level" processing provided by the browser, the interaction just boils down to a blind transfer of a (binary) payload, and the data is not in and of itself inherently processable.
This has an interesting comparison with web service descriptions which I will cover in a separate post.
Copyright © 2002-2008 Jorgen Thelin.
All rights reserved.
This weblog is licensed under a
Creative Commons License.