[Seaside] Getting started

Avi Bryant seaside@lists.squeakfoundation.org
Sun, 24 Nov 2002 11:05:36 -0800 (PST)


On Sun, 24 Nov 2002 tblanchard@mac.com wrote:

> > Did that all make sense?
>
> Wow.  Yes.  Thats very cool.  So the app is typically structured like a
> star with the home page and lots of little forays out to perform
> subtasks.  Very sensible.

Yes, that's a common structure.  Beyond that, each step/page in the
subtask is usually written as a simple, independent function, and a single
method on the home page for the task will use call/answer to string them
all together.

The SqueakMap browser is a good example of this in that many of the steps
are reused between, say the "view" task (pick a card, view that card) and
the "edit" task (pick a card, edit that card, view that card)

> Brief question - the session object - how is access to the current
> session made available to the current component?  I mean, I see the
> session attribute on WAComponent but I don't see where it gets set up.

WAComponent is a subclass of WASessionObject (which is not the same as
WASession).  WASessionObjects have two odd properties: one is that they
are automatically associated with the current session at creation time
(through a process->session lookup table).  The other is that they
(through a specialized compiler) delegate all of their state to the
session, allowing the value of their instance variables to roll back in
tandem with the browser back button (try it).