[Seaside] Seaside Components: Parent / Children

Zulq Alam zulq at orange.net
Wed May 17 02:00:17 UTC 2006

> To enable reusability.
> You want coupling from the specific to the general, never from the
> general to the specific.  

So you have N components each with code calling/constructing a component 
X in a variety of ways to get X to behave differently.

If we need to change how X is called (e.g. with more/different 
information) we have to change the N components.

If you have X react differently based on the properties of the caller 
(any of N) then a change to X is just a change to X assuming N provides 
access to these properties.

If X needs new/different properties from N then you add methods to N 
that are likely usable in a more general context. A change to N but a 
change that is about N and not about X.

Furthermore, X could be made tolerant of different Ns using #respondsTo.

I'm not advocating using one direction over the other. I think both have 
their advantages and disadvantages and in most cases this isn't even an 
issue, i.e. the number of N is very small (similar specificities).

It's late and I may be spouting rubbish, let me know if I am... ;-)

More information about the Seaside mailing list