[uf-rest] Fwd: [microformats-discuss] REX! Re: REST-discuss list,
iamstupidiot at gmail.com
Mon Oct 31 18:13:15 PST 2005
Hi all, I would like to share some of my experience regarding
> 1. Constraining REST verbs to POST/GET
I built a simple web app recently in order to gain some REST
experiences. The app's main target user agent is browser, and I faced
1) To send out HTTP requests other than GET, POST, script
(xmlhttprequest) is the only solution. What if some end-users fail to
turn on the scripting support in their browsers?
2) Some browsers still having problems to correctly send out desired
HTTP request (e.g Opera8 can't send out PUT, DELETE, IE6 having
problem to send out DELETE to URL which require HTTP-digest-auth).
My web app need to provide services: 1) friendly enough for both
script-enabled and script-disabled browsers, 2) and also *rich
semantic* enough for other *powerful* user agents.
As a results, I try to make use of the "client-server" constraint 
to come out with a solution by separating out UI from the app's main
"App functionality resources" accept complete HTTP requests (e.g GET,
PUT, POST, DELETE) to allow usual RESTful manipulation of resources.
"UI resources" (just some HTML Form pages) armed with scripts, allow
end-user to send out HTTP request directly to any "App functionality
In addition, the "UI resource" itself, also accepts POST request (in
case script failed), uses the received form-data to reconstruct an
internal request, then internally forwards it to the target "App
Well, here's some pictures (I always prefer pictures ;-) ) to show an
example on how to update an Announcement resource in my app:
With the separation of UI and functionality resources, the app now,
can serve well to various user agents including both script-enabled &
More information about the microformats-rest