[Seaside] Seaside Design Questions

Julian Fitzell julian at beta4.com
Thu Dec 4 07:28:21 CET 2003


Eric Hodel wrote:
> In the course of porting Seaside to Ruby, I've come across many things I
> didn't understand.  After beating my head against the wall, walking
> away, and coming back I figured out how they worked/why they were there.
> But that still didn't clue me into a few things...
> 
> Why does WAStateRegistry use snapshot:isIdenticalTo: instead of =?  In
> Smalltalk is = not always a valid indicator of two objects having the
> same state?

No, #= by default checks whether two objects have the same identity. 
You can override this on a class to do a different check, but in this 
case we always want to be comparing instance variables, not identity.

> Why are WAHtmlRenderer and WAHtmlBuilder split into two classes?
> Nothing is jumping out at me to explain this.

Layering.  WAHtmlRenderer doesn't know anything about callbacks or 
anything dynamic.  All the straight HTML generation is done there. 
WAHtmlBuilder adds the concept of generating URLs and buttons that 
actually trigger actions, inputs that are bound to variables, etc.

> Same for WASession and WAControllerSession, since start seems to be the
> only abstract method in WASession.  Is there some extra hooks that can
> be added by not subclassing from WAControllerSession?

Layering again.  WASession doesn't know anything about components. 
WAControllerSession adds the concept of a root component that generates 
a response for each request or delegates that to another component.

The 2.3 series of Seaside involved a lot of refactoring to separate the 
layers into pieces that were useable independently.  So you can for 
example use the session logic and the renderer without havng to use 
components.

> The rest of these seem to be leftovers or things I am completely missing
> the point of.
> 
> What was (is) the layout method on WAStoreBrowseFrame for?  It seems
> template-ish code for renderContentOn in WAStoreBrowseFrame.

Good question - there are no senders of that message in the package so 
I'm guessing it can go away.

> What is the Amb class for?  I don't see it used by any other part of
> Seaside.

Hmm - not sure.  My best guess is that it's there to make porting to 
VisualWorks easier but Avi will have a better idea than me.  I don't 
remember it ever being used in Squeak, so I don't think it's old. 
Probably has a purpose you don't care about.




More information about the Seaside mailing list