On 7/1/05, Cees Hek <suppressed> wrote:
> Does anyone know what REST::Application [1] is all about? I just saw
> it appear on CPAN today... It claims to be influenced by
> CGI::Application. I don't know what REST stands for or what a RESTful
> webapp is, so I am a little bit lost on this one.
I was down at php|Tropics last month, and the subject of REST came up during a
session on SOAP. Whereas SOAP uses XML to communicate between the client and the
server, REST simply uses HTTP to do its thing. This means that you need to
document your API -- what arguments/urls does the server expect; whether
arguments will be part of the path, a GET, or a POST; and what format the
response will be in (plain text, HTML, XML, etc) -- but that you can simply
utilize normal HTTP to do the handling. Another tenet of REST is that you map a
URL to a specific service or action; the server or CGI process then determines
what needs to be done based on what URL was used to call it. The client then
interprets the response however it sees fit.
So, in the end, you're left with what you've been doing all along -- programming
CGI. The difference is that it's now being used as a 'web service' for
communicating information in a slightly different way than simply a web page.
We've been doing it all along, really; REST is just a fancy new buzzword.
One example the presenter used was the PHP site itself. If you're not familiar
with it, you can do function lookups by simply typing in
http://php.net/functionname
When I came out of the session, I thought that CGI::Application would be ideally
suited to REST, without modifications of any sort. You map a REST action to a
particular method, and return a response. If you want to get fancy about it, you
use some mod_rewrite magic in Apache so that you have unique URLs for each run
mode. Then document what's returned.
--
Matthew Weier O'Phinney
suppressed
http://weierophinney.net/matthew/
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/suppressed/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed
Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.