Practically this is how most (e.g. PHP) frameworks use mod_rewrite to hide
their implementation, or just offer a REST like URL structure.
I'm curious. Is there a reference where the RESTFUL URL structure is
defined?
Unfortunately I can't find a single good source for it :(. The following
presentation is quite nice:
http://www.slideshare.net/Wombert/designing-url-schemes-and-rest-interfaces
(especially slide 43 and 44).
And an interesting list of dos and don'ts:
http://stackoverflow.com/questions/1619152/how-to-create-rest-urls-without-verbs/1619677#1619677
From what I can tell Click URLs are RESTFUL,
I guess they are only "RESTful(able)".
They don't follow the usual REST URL pattern:
- no extension (only mime type)
- less query strings in the form *page.htm?param1=value1 but values
separated by slashes *page/param1/value1 (using query strings only for
filtering).
It shouldn't be that complicated for ServletFilter placed just before
the compression filter to make Click have this type of URL scheme.
Personally I like having URL extensions (when I see an URL without an
extension, my first thought is still that it's a directory :) ).
but Click is not
a REST based framework (PUT, DELETE, READ etc).
I think it might be a great addition if somehow it would be easy
for the user(developer) to just "map" this behavior(URLs and the verbs)
over a Click application too (or at least over a part of the application):
- nowadays many webapps are required to expose a "public" API for a
part of their functionality, and that in a REST like style.
Adrian.