[Seaside] Component traits library?
renggli at gmail.com
Sat Jan 5 08:55:44 UTC 2008
> Would these be a reasonable use of traits? Seems like handy behaviors to mix
> in as needed but I'm not confident about the implications.
What does such a trait provide? What does it require? I am not sure I
understand how you want to integrate those component traits, and how
they interact with the existing code in your component class. Can you
maybe give an example with code?
Wouldn't it make more sense to add a specific WADecoration subclass to
add additional behavior to a component? Or simply wrap your target
component into another component? Or, if you only need some XHML
snippets to be generated, a custom subclass of WABrush?
The only place in Seaside where Traits would really help (in my
opinion) is the brush hierarchy. The W3C XHTML DOM attribute
collections would make a perfect candidate for a trait. Like this, no
brush would implement too much and not duplicate functionality (like
this currently happens a lot).
More information about the seaside