[Seaside] REST, bookmarkable URL's

Cees de Groot seaside@lists.squeakfoundation.org
2 Jan 2003 16:21:44 +0100


Stephen Pair <spair@acm.org> said:
>What I would like (and Avi and I have had some discussions about this)
>is the ability to "mount" Seaside's components on any arbitrary URLs.
>The Seaside component would be the "resource" (in REST terms).  Now, the
>problem is then that the URL would immediately result in a forward to
>another non-bookmarkable URL that controls the user interaction.
>
Hmm. It should be possible to stay at the first page without a redirect,
methinks. That would probably solve a big part of the issue, together
with 'bookmark me' buttons that point to the 'mount point'.

>However, this doesn't satisfy the REST priniples in that you
>aren't responding with the actual resource, but rather a pointer to the
>actual resource in the form of a frame.  This would make it difficult
>for an automated interface to be able to fetch the contents of a
>particular URL.
>
I agree. Frames are bad. I'm about to rip them from my app (which relis
heavily on a frame with tree left and forms right, like Zope).

>One thing that is still happening in all of this is that any URL into a
>Seaside system is going to result in an HTTP forward response (which
>forwards to the codified session URL).  I think most HTTP clients
>(including things like wget) can handle this just fine, but I thought
>I'd mention it here in case anyone can think of a reason that this would
>be an issue.
>
No. And certainly not if the mount path stays visible - you'd even could do
without a 'bookmark me' button. The idea is that the URL consists of two parts
at any stage in the transaction: the 'mount path', and some opaque info for
Seaside. 

<idea>
Seaside interprets the opaque info, and if it points to a session that's gone,
it uses the mount path to redirect to the 'entry page' of the component. 
</idea>

So I have a domain 'resource'. I 'mount' it at '/domain/foobar.com'. Now, when
I go to '/domain/foobar.com', Seaside redirects me to
'/domain/foobar.com?sess=SDFKJNEWIUFSKDFHksfZXC&step=1'. When I use that thing
half a year later, I get redirected to the same point, but with a fresh
session, and possibly a password box. 

I think that would combine best of both worlds. 



-- 
Cees de Groot               http://www.cdegroot.com     <cg@cdegroot.com>
GnuPG 1024D/E0989E8B 0016 F679 F38D 5946 4ECD  1986 F303 937F E098 9E8B
Cogito ergo evigilo