Using Clean URLs

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Using Clean URLs

littleSmalltalker
Hi,
I've seen several methods to using clean URLs:
 - http://gemstonesoup.wordpress.com/2008/08/07/making-_k-and-_s-optional-a-seaside-heresy/
 - http://onsmalltalk.com/clean-urls-in-seaside

What's the best way to use clean URLs in a Seaside application?
Maybe there's room for a package/library that handles this?


Avi.


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Using Clean URLs

Philippe Marschall
2011/3/8 Avi Shefi <[hidden email]>:
> Hi,
> I've seen several methods to using clean URLs:
>  -
> http://gemstonesoup.wordpress.com/2008/08/07/making-_k-and-_s-optional-a-seaside-heresy/
>  - http://onsmalltalk.com/clean-urls-in-seaside
>
> What's the best way to use clean URLs in a Seaside application?
> Maybe there's room for a package/library that handles this?

I think the issue would be better summarized as "Seaside without
sessions, callbacks and continuations". The use case in both cases
seems to be similar. Having the ability to run without sessions and
callbacks for some simple navigational landing pages and then some
time later have sessions, callbacks and continuations kick in.

Cheers
Philippe
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Using Clean URLs

Ramon Leon-5
On 03/08/2011 08:58 AM, Philippe Marschall wrote:
> I think the issue would be better summarized as "Seaside without
> sessions, callbacks and continuations". The use case in both cases
> seems to be similar. Having the ability to run without sessions and
> callbacks for some simple navigational landing pages and then some
> time later have sessions, callbacks and continuations kick in.
>
> Cheers
> Philippe

The approach from my blog, which I borrowed from CMSBox, and modified
slightly to not create a new instance of the root component on each hit,
does use Sessions, and maintains a single session for the duration; it's
just in the cookie rather than the URL.

It just doesn't use callbacks for navigation most of the time, I
generate anchors with URL's that are parsed by the root component on
each hit to load the correct content.  But you can use callbacks
whenever you want as it does in the pagers in the search results.

--
Ramon Leon
http://onsmalltalk.com
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Using Clean URLs

littleSmalltalker
Phillipe - Providing clean URLs doesn't have to mean that there are no sessions, callbacks and continuations. A possible change would encode the _s and _k params inside each page using hidden fields, therefore maintaining the same abilities regardless of how the URL looks like. Obviously this is not currently supported on Seaside, but still I would like to read your opinion about making this possible.

Thanks Ramon!
Any other approaches to this?


Avi.

On Tue, Mar 8, 2011 at 9:11 PM, Ramon Leon <[hidden email]> wrote:
On 03/08/2011 08:58 AM, Philippe Marschall wrote:
I think the issue would be better summarized as "Seaside without
sessions, callbacks and continuations". The use case in both cases
seems to be similar. Having the ability to run without sessions and
callbacks for some simple navigational landing pages and then some
time later have sessions, callbacks and continuations kick in.

Cheers
Philippe

The approach from my blog, which I borrowed from CMSBox, and modified slightly to not create a new instance of the root component on each hit, does use Sessions, and maintains a single session for the duration; it's just in the cookie rather than the URL.

It just doesn't use callbacks for navigation most of the time, I generate anchors with URL's that are parsed by the root component on each hit to load the correct content.  But you can use callbacks whenever you want as it does in the pagers in the search results.

--
Ramon Leon
http://onsmalltalk.com

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Using Clean URLs

Philippe Marschall
2011/3/9 Avi Shefi <[hidden email]>:
> Phillipe - Providing clean URLs doesn't have to mean that there are no
> sessions, callbacks and continuations. A possible change would encode the _s
> and _k params inside each page using hidden fields, therefore maintaining
> the same abilities regardless of how the URL looks like.

Works only for forms, not for anchors. Breaks F5.

> Obviously this is
> not currently supported on Seaside, but still I would like to read your
> opinion about making this possible.

Cheers
Philippe
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside