URL problems

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

URL problems

Jimmie Houchin-3
Hello All,

I know, I know, we've been around this mountain. :)

But I just wanted to post about an issue with the Seaside URL handling.

I don't know if this is the way Seaside is supposed to work or if there
is a different way which works the way I and I believe most people expect.

I am reading the tutorial at:

http://www.swa.hpi.uni-potsdam.de/seaside/tutorial

I open up each chapter in its own tab in Firefox. Due to Firefox's
ability to resume sessions and whatever reason I had to shut down my
laptop. That window with all its tabs were shut down and then later resumed.

But the problem is that when the window and its tabs resumed every
single tab was identical. Yuck!!!

Tabs like these:
http://www.hpi.uni-potsdam.de/swa/seaside/tutorial?1&_k=bveMvOxz&_s=MvWvDTBHoWiSRmFs
http://www.hpi.uni-potsdam.de/swa/seaside/tutorial?2&_k=bveMvOxz&_s=MvWvDTBHoWiSRmFs
http://www.hpi.uni-potsdam.de/swa/seaside/tutorial?3&_k=bveMvOxz&_s=MvWvDTBHoWiSRmFs
http://www.hpi.uni-potsdam.de/swa/seaside/tutorial?4&_k=bveMvOxz&_s=MvWvDTBHoWiSRmFs
http://www.hpi.uni-potsdam.de/swa/seaside/tutorial?5&_k=bveMvOxz&_s=MvWvDTBHoWiSRmFs
http://www.hpi.uni-potsdam.de/swa/seaside/tutorial?6&_k=bveMvOxz&_s=MvWvDTBHoWiSRmFs
http://www.hpi.uni-potsdam.de/swa/seaside/tutorial?7&_k=bveMvOxz&_s=MvWvDTBHoWiSRmFs
http://www.hpi.uni-potsdam.de/swa/seaside/tutorial?8&_k=bveMvOxz&_s=MvWvDTBHoWiSRmFs
http://www.hpi.uni-potsdam.de/swa/seaside/tutorial?9&_k=bveMvOxz&_s=MvWvDTBHoWiSRmFs
http://www.hpi.uni-potsdam.de/swa/seaside/tutorial?10&_k=bveMvOxz&_s=MvWvDTBHoWiSRmFs
http://www.hpi.uni-potsdam.de/swa/seaside/tutorial?11&_k=bveMvOxz&_s=MvWvDTBHoWiSRmFs

became:
http://www.swa.hpi.uni-potsdam.de/seaside/tutorial
http://www.swa.hpi.uni-potsdam.de/seaside/tutorial
http://www.swa.hpi.uni-potsdam.de/seaside/tutorial
http://www.swa.hpi.uni-potsdam.de/seaside/tutorial
http://www.swa.hpi.uni-potsdam.de/seaside/tutorial
http://www.swa.hpi.uni-potsdam.de/seaside/tutorial
http://www.swa.hpi.uni-potsdam.de/seaside/tutorial
...

I wanted the pages with each individual chapter. Not the front page or
entry point to the tutorial. I don't want to have to repeat the process
every single time something like this occurs. This is counter to most
all other experience on the web.

Is this simple wrong tool for the job? ie: the tutorial site isn't
really a web app, which is what Seaside is for?
Or is there a better way for the tutorial site to handle the chapters?

This isn't an attempt to reform Seaside's URL handling. Just trying to
understand the situation fully.

Thanks.

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

Re: URL problems

Philippe Marschall
2007/12/8, Jimmie Houchin <[hidden email]>:

> Hello All,
>
> I know, I know, we've been around this mountain. :)
>
> But I just wanted to post about an issue with the Seaside URL handling.
>
> I don't know if this is the way Seaside is supposed to work or if there
> is a different way which works the way I and I believe most people expect.
>
> I am reading the tutorial at:
>
> http://www.swa.hpi.uni-potsdam.de/seaside/tutorial
>
> I open up each chapter in its own tab in Firefox. Due to Firefox's
> ability to resume sessions and whatever reason I had to shut down my
> laptop. That window with all its tabs were shut down and then later resumed.
>
> But the problem is that when the window and its tabs resumed every
> single tab was identical. Yuck!!!
>
> Tabs like these:
> http://www.hpi.uni-potsdam.de/swa/seaside/tutorial?1&_k=bveMvOxz&_s=MvWvDTBHoWiSRmFs
> http://www.hpi.uni-potsdam.de/swa/seaside/tutorial?2&_k=bveMvOxz&_s=MvWvDTBHoWiSRmFs
> http://www.hpi.uni-potsdam.de/swa/seaside/tutorial?3&_k=bveMvOxz&_s=MvWvDTBHoWiSRmFs
> http://www.hpi.uni-potsdam.de/swa/seaside/tutorial?4&_k=bveMvOxz&_s=MvWvDTBHoWiSRmFs
> http://www.hpi.uni-potsdam.de/swa/seaside/tutorial?5&_k=bveMvOxz&_s=MvWvDTBHoWiSRmFs
> http://www.hpi.uni-potsdam.de/swa/seaside/tutorial?6&_k=bveMvOxz&_s=MvWvDTBHoWiSRmFs
> http://www.hpi.uni-potsdam.de/swa/seaside/tutorial?7&_k=bveMvOxz&_s=MvWvDTBHoWiSRmFs
> http://www.hpi.uni-potsdam.de/swa/seaside/tutorial?8&_k=bveMvOxz&_s=MvWvDTBHoWiSRmFs
> http://www.hpi.uni-potsdam.de/swa/seaside/tutorial?9&_k=bveMvOxz&_s=MvWvDTBHoWiSRmFs
> http://www.hpi.uni-potsdam.de/swa/seaside/tutorial?10&_k=bveMvOxz&_s=MvWvDTBHoWiSRmFs
> http://www.hpi.uni-potsdam.de/swa/seaside/tutorial?11&_k=bveMvOxz&_s=MvWvDTBHoWiSRmFs
>
> became:
> http://www.swa.hpi.uni-potsdam.de/seaside/tutorial
> http://www.swa.hpi.uni-potsdam.de/seaside/tutorial
> http://www.swa.hpi.uni-potsdam.de/seaside/tutorial
> http://www.swa.hpi.uni-potsdam.de/seaside/tutorial
> http://www.swa.hpi.uni-potsdam.de/seaside/tutorial
> http://www.swa.hpi.uni-potsdam.de/seaside/tutorial
> http://www.swa.hpi.uni-potsdam.de/seaside/tutorial
> ...
>
> I wanted the pages with each individual chapter. Not the front page or
> entry point to the tutorial. I don't want to have to repeat the process
> every single time something like this occurs. This is counter to most
> all other experience on the web.

You can change this behavior, you just have to do it, it won't come
automatically. BTW this is all documented in the code but since people
don't read documentation and I don't have anything better to do I'll
repeat it. There are three different paths

- You can add path elements to the url of an anchor with #extraPath:
- You can modify the 'current' url with #updateUrl:
- You can set up your components if a new session is started with
#initialRequest:

All this url fiddling is very annoying but if you really want to do it
you can do it. There is a much simpler solution and that is letting
sessions live forever.

Cheers
Philippe

> Is this simple wrong tool for the job? ie: the tutorial site isn't
> really a web app, which is what Seaside is for?
> Or is there a better way for the tutorial site to handle the chapters?
>
> This isn't an attempt to reform Seaside's URL handling. Just trying to
> understand the situation fully.
>
> Thanks.
>
> Jimmie
> _______________________________________________
> 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: URL problems

Randal L. Schwartz
>>>>> "Philippe" == Philippe Marschall <[hidden email]> writes:

Philippe> All this url fiddling is very annoying but if you really want to do
Philippe> it you can do it. There is a much simpler solution and that is
Philippe> letting sessions live forever.

Right after you upgrade your machine to that "infinite memory" module.

:-)

--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[hidden email]> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: URL problems

Lukas Renggli
> Right after you upgrade your machine to that "infinite memory" module.

Or use GemStone.

Lukas

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

Re: URL problems

Randal L. Schwartz
>>>>> "Lukas" == Lukas Renggli <[hidden email]> writes:

>> Right after you upgrade your machine to that "infinite memory" module.

Lukas> Or use GemStone.

You'll still eventually run out of objects.  It just takes longer with
Gemstone. :)

--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[hidden email]> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: URL problems

Dave Bauer-3
In reply to this post by Philippe Marschall
On Dec 8, 2007 11:19 AM, Philippe Marschall
<[hidden email]> wrote:
> 2007/12/8, Jimmie Houchin <[hidden email]>:

> > I wanted the pages with each individual chapter. Not the front page or
> > entry point to the tutorial. I don't want to have to repeat the process
> > every single time something like this occurs. This is counter to most
> > all other experience on the web.
>
> You can change this behavior, you just have to do it, it won't come
> automatically.

Right, but you the point is that when you need it you should do it.
The original poster isn't asking, how to do it.

> > Is this simple wrong tool for the job? ie: the tutorial site isn't
> > really a web app, which is what Seaside is for?
> > Or is there a better way for the tutorial site to handle the chapters?
> >

This is the key of the post, not that there is something wrong with
seaside, but that perhaps something like a tutorial is a totally
different
use and perhaps the default behavior does not make sense for the tutorial.
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: URL problems

Randal L. Schwartz
>>>>> "Dave" == Dave Bauer <[hidden email]> writes:

Dave> This is the key of the post, not that there is something wrong with
Dave> seaside, but that perhaps something like a tutorial is a totally
Dave> different use and perhaps the default behavior does not make sense for
Dave> the tutorial.

As far as I understand the problem, for each component you could ask
yourself:

        Would I ever want to come back to *this* component in *this* state
        as the result of a bookmark rather than a particular session?

If the answer is "Yes", then the next step is for the component to add
URL-based state information to the URL with #extraPath: or #updateUrl:,
and then recognize those state items with #initialRequest:.

Perhaps a good demo of this would be handy.  Maybe I can come up with
something, but Smarter People than Me might do it even faster and post
it to one of their blogs (nudge nudge).

--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[hidden email]> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: URL problems

Jimmie Houchin-3
In reply to this post by Philippe Marschall
Philippe Marschall wrote:

> 2007/12/8, Jimmie Houchin <[hidden email]>:
>> Hello All,
>>
>> I know, I know, we've been around this mountain. :)
>>
>> But I just wanted to post about an issue with the Seaside URL handling.
>>
>> I don't know if this is the way Seaside is supposed to work or if there
>> is a different way which works the way I and I believe most people expect.
>>
>> I am reading the tutorial at:
>>
>> http://www.swa.hpi.uni-potsdam.de/seaside/tutorial
>>
>> I open up each chapter in its own tab in Firefox. Due to Firefox's
>> ability to resume sessions and whatever reason I had to shut down my
>> laptop. That window with all its tabs were shut down and then later resumed.
>>
>> But the problem is that when the window and its tabs resumed every
>> single tab was identical. Yuck!!!
[snip]
>> I wanted the pages with each individual chapter. Not the front page or
>> entry point to the tutorial. I don't want to have to repeat the process
>> every single time something like this occurs. This is counter to most
>> all other experience on the web.
>
> You can change this behavior, you just have to do it, it won't come
> automatically. BTW this is all documented in the code but since people
> don't read documentation and I don't have anything better to do I'll
> repeat it. There are three different paths

Thanks for this information. As this was not my app and I was observing
as an end user, I wasn't looking at any code, but rather the behavior. I
am very pleased that this is documented in the code so that when I am
developing I will be understand better. Thanks.

> - You can add path elements to the url of an anchor with #extraPath:
> - You can modify the 'current' url with #updateUrl:
> - You can set up your components if a new session is started with
> #initialRequest:
>
> All this url fiddling is very annoying but if you really want to do it
> you can do it. There is a much simpler solution and that is letting
> sessions live forever.

Thanks for this information. It is nice to know that this is doable,
even if it does add some overhead to the development process.

But I do agree with some of the other posters. That the chapter pages in
the Tutorial aren't really session data as much as they are independent
URLs.

It is nice to know that while this may not be the common use of Seaside
for this style of site, that it can be done with our favorite web app
framework. I would hate to think that I would need to complicate my life
with something like Rails in order to accomplish such. :)

Especially when most often the time for something like that, is for
something small like the Tutorial site. More web site like, and less web
app like. But you never know. There are some Big web sites out there.

Smalltalk, Seaside just provide too many nice things to have to stoop to
such things as Rails. ;)

Thanks.

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

Re: URL problems

Randal L. Schwartz
>>>>> "Jimmie" == Jimmie Houchin <[hidden email]> writes:

Jimmie> But I do agree with some of the other posters. That the chapter pages
Jimmie> in the Tutorial aren't really session data as much as they are
Jimmie> independent URLs.

They *are* session-dependent if the page had some breadcrumb trail on it,
or perhaps a different view depending on whether you're logged in or are
in the middle of a search.

That's why it's not automatic.  It's up to every application (author) to
decide if this particular component showing this particular view is session
dependent or independent, and if independent, if it's worth making
it bookmarkable.

In traditional web programming, the default is "sessions are hard,
bookmarks are easy".  In Seaside, the default is "sessions are easy,
bookmarks are hard".  You can't get both at the same time.

--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[hidden email]> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside