[Seaside] Seaside and REST

Philippe Marschall philippe.marschall at gmail.com
Thu Mar 29 22:00:53 UTC 2007


2007/3/29, Andreas Raab <andreas.raab at gmx.de>:
> Hi Folks -
>
> I've been toying around with Seaside and there are quite a few things
> that I don't understand. Since I've been spamming the Squeak list
> already with some of these questions I figure it's probably about time
> to move the discussion to this list. Here we go:
>
> * RESTful URLs: Philippe pointed me to http://www.lukas-renggli.ch/blog/
>   which discusses the use of RESTful URLs in Pier. Looking at it I found
> the dazzlingly cryptic method PRPierFrame>>initialRequest: and gave up
> on the idea for the time being ;-)
>
> Could someone perhaps give a brief outline of what needs to be done to
> support RESTful URLs in Seaside that both, goes well beyond "it can be
> done" and stays well short of PRPierFrame's implementation? ;-)
>
> * GET vs. POST: One of the things that confused me about the simple
> counter example already is that it uses POST instead of GET - isn't GET
> supposed to be idempotent as well as not modifying the requested resource?

Idempotent does not mean has no side effects. Idempotent means it
doesn't matter whether the action is executed once or more times. This
is true for the counter. You can refresh it as many times as you want,
the count doesn't increase. Going back and hitting '++' again will
result in the same count.

As long as you're just messing with UI state I don't see a problem
with using GET. I mean what havoc can be done? In the worst case the
crawler messes up his UI.

For "real" state changes you have a point but Seaside really handles
this just like every other webframework so I don't see how this is a
particular issue of Seaside and not every framework (or HTML in
general). Yes you have to know HTML to use Seaside but pretty much
every other webframework requires you to do so too.

If you open filestreams in Squeak you have to make sure you close
them. Is this a particular issue of Squeak that it requires you to
know about operating systems and file descriptors?

Philippe

> Can someone explain to me why Seaside uses GET for such requests and not
> POST? What rules does Seaside have for using GET vs. POST? What happens
> if a robot ever comes across the counter example?
>
> Thanks,
>    - Andreas
> _______________________________________________
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>


More information about the seaside mailing list