[Seaside] VW questions

Ramon Leon ramon.leon at allresnet.com
Tue Oct 30 00:13:13 UTC 2007


> Hi,
> 
> can someone explain to me my components do not know who their 
> parents are (quickly before I put this is in!)
> 
> I am struggling to see why this would be a bad idea, since 
> without it I can see no way of enabling message routing from 
> components.

It's a bad idea because it makes components that aren't reusable, they
become very tightly bound to their parents.

> Announcements seems limited to me since if using a global 
> announcer. I cannot see how two similar components on one 
> page, each trying to announce something to their 
> parents/containers would be able to.

You don't have to use a global announcer, every component can have it's own
announcer and you can have parents subscribe to events their children throw
that they're interested in, this keeps the children loosely coupled and
reusable.  

You could also just have a sender on the announcement to let the parent
decide if the sender was a child, if you prefer a single global announcer.

> any thoughts would be appreciated.
> 
> Keith

Every time I've gone down the parent path, I've regretted it.  I'll stick
with announcements, much better approach.

Ramon Leon
http://onsmalltalk.com



More information about the seaside mailing list