[Seaside] Multiple tabs with their own root components

Esteban Maringolo emaringolo at gmail.com
Tue Aug 11 02:37:33 UTC 2020


Hi all,

I have a question that I cannot answer myself even though I have built
a handful of medium sized applications with Seaside. To some degree it
is embarrassing, but I need to ask just in case I've been missing
something trivial all these years.

I'm building a "public" web app, and I have some newer concerns I
didn't have before because most apps ran in private environments or
behind logins and were mostly complex UI or flows where Seaside shines
and no one cares (mostly) about URLs.

These days it is very common that you can open a link in a new tab to
view something, then close it, duplicate it or even the browser might
restart on that page. The problem is that with Seaside, as long as one
action continuation is triggered then as soon as you reload one of
these tabs it shows content from the last tab that had some
continuation activated.

My solution was to change all callbacks that do simple #show: actions
with the canonical url of the called page, to implement
#initialRequest: to handle the few cases where I need to provide a
stable url (for sharing and for Open Graph and friends) and to use
Cookie based session tracking.

This is similar to the method proposed years ago by Ramon on his blog
[1], but without meddling with the Render Loop. I guess that the
Seaside book website does something similar.

Is there any other way of achieving independent flow in each tab, each
with its own renderloop with a different root component? So basically
I can have different branches of "_k" when needed.

Maybe a Stateful framework such as Seaside is overkill for these
cases, in particular because it's heretical in many aspects, but I'm
still very productive with its component based development and it's
canvas way of building them.

Shall we start thinking what we need and want for Seaside 4.0? :-)

Regards,

[1] http://onsmalltalk.com/clean-urls-in-seaside

Esteban A. Maringolo


More information about the seaside mailing list