avi at beta4.com
Fri Nov 7 08:37:07 CET 2003
On Nov 6, 2003, at 8:43 PM, David Farber wrote:
> First, I was intrigued to hear you say that redirecting adds
> (non-trivial) complexity to the Seaside framework. I built a small
> framework in Cold Fusion once that also split processing and viewing
> by issuing a redirect in between. It was really straightforward--which
> shouldn't be suprising since Cold Fusion doesn't really let you do
> anything complex.
Yeah, I probably overstated the complexity. Mostly it's just that it
adds a global preference (whether or not to do the redirects). There
aren't many of those, and so every one seems like a big deal.
> Second, perhaps it would be useful to move away from talking about
> POSTs-vs-links and talk about static-vs-dynamic requests. A static
> request is one that always resolves to a known object/location, like
> an icon. A dynamic request is one whose ultimate resolution is unknown
> at the time the request is made. For example, when I hit OK after
> filling in my username or password, I might wind up back at the form
> if my username/password is incorrect or I might wind up at "My Yahoo!"
> if the username and password check out. Yes, dynamic requests are
> almost always POSTs, but every once in a while you find that you want
> a link to do POSTy things--just yesterday I had a client ask to be
> able to login via a GET with query parameters instead of using a POST.
> Maybe if the conceptual distinction was emphasized it would be easier
> to know when you win by paying the price of the redirect.
In Seaside, every request is dynamic in this way, so it's not a useful
distinction. Seaside uses a control flow model, not a resource model -
URLs refer to points in the execution of the program, not to static
objects. The more relevant question is whether or not a particular
request is idempotent - is sending it multiple times different from
sending it once? Does rewinding that particular section of the program
and playing it again have any negative effects? This is the conceptual
distinction people should be keeping in mind, if any.
More information about the Seaside