Uninformed
2007-08-02T15:02:44Z | Comments: 4
The industry mainstream has now heard of REST, but not everyone gets it yet. Example: this Directions article.
When writing about REST, the most important things to communicate are the central tenets. Tim Bray explains them like this:
- You have a lot of things in the system, identified by URIs.
- The protocol (probably HTTP) only knows one MEP [message exchange pattern]: single-request, single-response, with the request directed at a URI.
- An important subset of the requests, what HTTP calls GET, are read-only, safe, idempotent.
- You expect to ship a lot of URIs around in the bodies of requests and responses, and use them in operations that feel like link following.
Andrews doesn't address the tenets and, instead, muddles around with "GET URLs" and "POST URLs" in an article that misinforms readers. Most of what's wrong in the article is summarized in the first sentance of the closing paragraph (emphasis mine):
Until then, I don't have much of an opinion about whether the industry should standardize on POST or GET request types. Both types of request use predictable, standardized formats that can be executed elegantly or poorly. The REST discussion reveals that the industry should consider that predictability is not the only goal of standards. Intuitiveness and accessibility may be equally important when establishing information exchange standards.
In reality, there's no such controversy. A RESTful GIS web service uses both POST and GET: the former to create new web resources, the latter to fetch representations of resources in a safe (no side-effects) way.
