[Seaside] Meaningful URLs was (Re: HV intro...) on the Squeak list

Marcel Weiher marcel@metaobject.com
Wed, 17 Apr 2002 14:36:34 +0200


On Tuesday, April 16, 2002, at 08:57  Uhr, Cees de Groot wrote:

> Cees de Groot <cg@cdegroot.com> said:
>> I've got some very ugly URLs between my bookmarks. I couldn't care 
>> less,
>> because the software shows the title of the page, not the URL itself.
>>
> I was a bit too quick here, completely overlooked the fact that these 
> ugly
> URL's tend to have session identifiers in them and thus are invalid
> two weeks later. Oops. However, this can be dealt with gracefully in a 
> lot of
> cases by the server - simply create a new session and redirect the 
> user. Or
> encrypt everything necessary for the session in the ugly URL and forget 
> about
> keeping it around server-side, so that it effectively never expires.

Yes, making the page essentially stateless.  Many pages have a very 
limited amount of state that isn't much harder to encode into the URL 
than a session.  Let's say you have a single object that contains the 
state for a page.  Just use key-value coding to encode that object as 
URL-parameters, encoding the page class itself in the path.  The generic 
logic then unarchives this object from the URL parameters, sets up the 
page with that object and starts executing.

Marcel

--
Marcel Weiher				Metaobject Software Technologies
marcel@metaobject.com		www.metaobject.com
Metaprogramming for the Graphic Arts.   HOM, IDEAs, MetaAd etc.