Traits in use (was Re: Squeak and Namespaces)

Klaus D. Witzel klaus.witzel at cobss.com
Sat Dec 2 09:19:54 UTC 2006


Now that you mention xhtml: Todd Blanchard's HTMLCSS is a very  
professional framework

- http://www.squeaksource.com/htmlcssparser

and to his HTML*Node class hierarchy I've added Traits, along the lines of

- http://www.w3.org/TR/xhtml-modularization/abstract_modules.html
- http://www.w3.org/TR/html4/sgml/dtd.html

Not much to show, yet. Mainly because I wait for stronger tool support  
(lazy me ;-)

But send me an email if you want the source code.

/Klaus

On Sat, 02 Dec 2006 10:00:50 +0100, Lukas Renggli wrote:

>> Lukas you mentioned to me once a cool place in seaside where traits
>> would really help. But again we cannot change seaside. So bootstrap.
>
> The canvas framework has a lot of duplicated code and/or code that is
> defined too high in the hierarchy. The framework provides an
> implementation of the different XHTML tags as specified in [1]. The
> abstract element (WATagBrush) should only implement the relevant
> methods (#attributeAt:, #attributeAt:put:, etc.) that are specified in
> the W3C DOM [2] implementation.
>
> Now XHTML has the so called generic attributes [2] (coreattrs, events,
> focus, ...). It also has a notion of what can be nested into each
> other. Moreover there is Seaside that defines different kinds of
> callbacks, unfortunately not all kinds of callbacks are valid on all
> elements. To keep it short, there is a lot of orthogonal things going
> on. Tough it would be easy to put these things into traits and compose
> them with the right elements. Like this you wouldn't get 11 mostly
> identical implementations of #callback:, 7 identical implementations
> of #on:of:, 4 identical implementations of #form:, #extnet:, #width:,
> #height:, ...
>
> Cheers,
> Lukas
>
> [1] http://www.w3.org/TR/2002/REC-xhtml1-20020801/dtds.html
> [2] http://www.w3.org/TR/REC-DOM-Level-1/idl-definitions.html
>





More information about the Squeak-dev mailing list