[Seaside] Seaside2: separation between content and presentation

Avi Bryant seaside@lists.squeakfoundation.org
Mon, 2 Dec 2002 15:56:44 -0800 (PST)


On Tue, 3 Dec 2002 tblanchard@mac.com wrote:

> >   In
> > Seaside 0.94 you had to specify the class of the subcomponent in the
> > bindings, just as you do below in WO.  This meant that setting up even
> > a
> > simple tab control required tedious use of switch logic, and is IMO a
> > serious flaw in the WO subcomponent system (but if there's a clean way
> > around it I'd love to hear it).
>
> WOSwitchComponent is pretty clean I think.  I can't think of any better
> way to do it in Seaside offhand.  How would you do it?

Having a binding for the class name is fairly clean - I hadn't seen that
used before.  What I was thinking of as "switch" actually seems to be
KeyValueConditional - ie, this kind of stuff:
http://developer.apple.com/techpubs/webobjects/Reference/WOJExtensions/WOTabPanel/_Example.html
which I find pretty ugly.

Even WOSwitchComponent seems like it might have some problems, though -
when does it check the binding and change the subcomponent?  If on every
view, then your subcomponent can't have state.  If only once, then it
doesn't change if the binding does.  It could create a new subcomponent
only when the binding was different from the last time, which would
probably work most of the time, but is still a bit clunky (at least, when
I played similar games in Seaside 0.94, they felt clunky to me...).

This is getting a little OT, though...

Avi