[Seaside] Seaside Design Questions

Avi Bryant avi at beta4.com
Thu Dec 4 07:34:12 CET 2003


On Dec 3, 2003, at 7:20 PM, 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...

You know, you could have just sent me an email.... ;)

> Why does WAStateRegistry use snapshot:isIdenticalTo: instead of =?  In
> Smalltalk is = not always a valid indicator of two objects having the
> same state?

It's not, no - it defaults to be the same as #== (object identity), 
which isn't very useful in this case.  At this point that should 
probably be refactored to Object>>hasIdenticalInstanceVariablesTo: or 
something.

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

So that WAHtmlBuilder is (in theory) reusable in contexts other than 
Seaside.  All it does is print HTML to a stream,so it might be useful 
for generating static pages or something.

> 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?

It's about layering - WASession doesn't know anything about Controller. 
  WAControllerSession does.  In theory, you could rip out Controller and 
everything that depends on it, and still have a decent 
continuation-based session framework.

Below that, you could rip out WASession and still have a decent 
request/response servlet system.

> The rest of these seem to be leftovers or things I am completely 
> missing
> the point of.

Pretty much, yep:

> What was (is) the layout method on WAStoreBrowseFrame for?  It seems
> template-ish code for renderContentOn in WAStoreBrowseFrame.

Yeah, just an experiment I forgot to clean up.  The idea was to be able 
to specify a table layout with a 2D array literal - this subcomponent 
goes on top, these two under it, etc.  I believe the elements in the 
layout where specified as unary selectors that, when sent to the 
component, were supposed to return something that responds to 
#renderOn:.  It might still be a useful idea, I just haven't played 
with it much.

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

It's not, and never was.  Basically it's an extended test case for 
Continuation.

It's actually nice to have someone go through and question this stuff - 
it keeps me honest.  If there's ever any element of the design that 
someone doesn't understand, please ask.  The worst case is that I'll 
explain it, thus adding to the store of documentation, and the best 
case is that we'll realize that the design sucks and be able to improve 
it.



More information about the Seaside mailing list