Discussion:
[cgi-prototype-users] REST architecture for a guestbook application
Terrence Brannon
2005-09-05 12:07:13 UTC
Permalink
I have been trying to figure out how to model the resources of a
guestbook cgi program using REST. My CGI program is named guestbook
and my domain name is metaperl.org

GET /guestbook
returns the first 10 entries of the guestbook with links to page
forward to 11-20. REST supposedly works without cookies, so if a
user had a preference for entry listings per page, what to do?
GET /guestbook?o=xml
returns the entire guestbook in XML format
POST /guestbook
adds an entry to the guestbook. But here is my problem, I need a URL
which returns a page that the user can fill in and hit submit. What
would such a URL look like?
GET /guestbook/stats
returns a page showing the stats on the guestbook.
--
Carter's Compass: I know I'm on the right track when,
by deleting something, I'm adding functionality.
A. Pagaltzis
2005-09-09 15:45:02 UTC
Permalink
Post by Terrence Brannon
I have been trying to figure out how to model the resources of
a guestbook cgi program using REST.
I think we’re getting rather far off topic for the list at this
point.
Post by Terrence Brannon
GET /guestbook
returns the first 10 entries of the guestbook with links to
page forward to 11-20. REST supposedly works without cookies,
so if a user had a preference for entry listings per page,
what to do?
There’s no such thing as a “preference” between applications
talking to each other, which is what REST is mainly relevant to:
machine-oriented webservice APIs. Browser interfaces for humans
have different needs.
Post by Terrence Brannon
POST /guestbook
adds an entry to the guestbook. But here is my problem, I
need a URL which returns a page that the user can fill in and
hit submit. What would such a URL look like?
In my book, `GET /guestbook?view=add`.

Regards,
--
Aristotle
“Like punning, programming is a play on words.”
– Alan J. Perlis, “Epigrams in Programming”
Loading...