[Seaside] What's the difference and why??

Rick Flower rickf at ca-flower.com
Tue Feb 28 00:53:56 UTC 2006


Brian Brown wrote:
> This get's called from that initialize method above, so you have an 
> instance of the MenuArea class sitting in the menuArea ivar (short for 
> instance variable). The html render: menuArea doesn't instantiate a 
> new version of the class, it simply sends the current html renderer to 
> the renderContentOn: method of the MenuArea class.
>
> Does that make sense?
Yes, Sounds good to me..

> This is one of the very cool parts of Seaside... the #call: #answer: 
> methods. What happens is that you send the #call: message with a 
> WAComponent subclass as the argument. The component that was called 
> becomes the delegate for the calling component. For all intents and 
> purposes, it replaces the calling component until it issues an #answer 
> message, then the "control" is returned to the calling component. The 
> renderContentOn: method of the top delegate is the one that is 
> rendered, all the other delegates in the chain are effectively 
> invisible. You can chain as many of these #call:s as you want. 
> clearAllDelegates removes the delegate chain, so the root component is 
> the one that is rendered again.
>
> I hope this shed a bit of light on the subject, but it may be 
> confusing from my description ;)
Cool.. I had read about the #call / #answer methods, but didn't realize 
there was a way to nuke the stack so to speak.. I'll have to try
this out..

> Try to think of it more like GUI programming on a desktop rather than 
> some template based web framework. In a normal web app, pages are 
> short lived, but in seaside an object that renders a page stays around 
> for your session and can have much greater functionality.
>
That's a pretty good analogy.. It really is more like writing a desktop 
program than doing any other sort of web development.

Thanks again!

-- Rick



More information about the Seaside mailing list