[Seaside] Design of WAComponent(s)

Andreas T ö nne atoenne at cincom.com
Wed Mar 5 12:10:44 UTC 2008


please do not overrate my choice of WATree. My ideas were more general. I
did not know that WATree has such special status or else I would have picked
another example.

You said

> It is so simple and quick to create my own widget that does exactly
> what I need, why should I bother with a huge library that could do
> everything after hours of configuration?

and this is a point where I disagree. Surely I follow your aversion against
an Überframework like Swing. But I have seen too many copy&paste
applications to know that the average developer out there needs and likes
some guidance through designed inner structure of frameworks.

Right now things are small and the number of components is manageable. With
a growing number of components and component features I fear that we might
see a similar development as the wrapper framework of VisualWorks. It used
to be based on a simple, clear and powerful model. Then step by step it got
overloaded by features and variation. Today its implementation is "baked
together" with a lot of copy&paste.

Your suggestion to name multiple trees (or other components for that matter)
through enclosing DIV is exactly one of those principles I am looking at.
For the purpose of XHTML generation a component might need a name for its
styles. The programmers choice is to *know* that one names components
externally by enclosing them in a DIV and using path names to specify
dedicated styles. The designers choice is to place this knowledge into the
component and make it one of the options a user of the component might take.

Another example of this implementation vs. design choice is the composition
of components. Right now a component uses a composite pattern by convention.
I would prefer the composite pattern to be pre-implemented. I am sure this
has been discussed excessively already :-)

Did you refer to this mailing list or to seaside-dev for the 2.9 features

If you like to see how such frameworks scale, I will try this out.

See it anytime next month on www.smalltalk80.de.


Am 05.03.2008 11:58 Uhr schrieb "Lukas Renggli" unter <renggli at gmail.com>:

>>  responsibility of components?". Add that you cannot have two trees on a page
>>  with different appearance (style) without some work, involving code
>>  duplication.
> Of course you can have different looking trees on a single page, you
> simply put them into a div-tag with a specific class/id.
>>  If we split this class into independent concepts that can be
>>  recombined/varied in useful ways then we get:
>>  - a model of a tree
>>  - a model of the visual appearance (expand/collapse) of the tree model
>>  - a XHTML generator
>>  = a domain logic combining the above three with selection and interface to
>>  the application logic (callback)
> Maybe you want to the check the history of WATree in the mailing list?
> Why it was put into Seaside-Core and why it will be gone in Seaside
> 2.9.
> The goal of WATree is to give a component for quick prototyping and as
> such it is probably not useful for your specific needs.
>>  development work and code duplication is taking place. I think the message
>>  to new developers should be "pick a component and configure it to your
>>  needs" instead of "look at the examples and program one for yourself".
> I guess most people start with one of the ready-made components and
> use it until they hit the limits. And only then they start to subclass
> or write their own widget.
> Of course it would be nice if WATree was more configurable, but I
> doubt a newbie would prefer it over the simplicity of WATree. Having
> to provide several models for a working tree, reminds me of my worst
> nightmares when looking at the code of students that use Swing JTable
> for the first time.
> It is so simple and quick to create my own widget that does exactly
> what I need, why should I bother with a huge library that could do
> everything after hours of configuration?
>>  So what do you think? Is there a project/plans in this direction? Did I
>>  violate the principles of Seaside?
> There are several projects working on widget libraries. You mentioned
> ShoreComponents. Scriptaculous-Components is another one, focusing on
> widgets with AJAX interaction. Both approaches don't provide much more
> than a few configuration blocks.
> It certainly does not violate the principles of Seaside. It might be
> worth to investigate how well this scales?
> Cheers,
> Lukas

Andreas Tönne
Lead Consultant
Cincom Systems GmbH & Co. oHG
Tel.: +49 6196 9003 100
Mobile: +49 172 6159272
Fax: +49 6196 9003 270

Geschäftsführer/Managing Directors: Thomas M. Nies, Gerald L. Shawhan
oHG mit Sitz/based in Schwalbach/Ts. (Amtsgericht Königstein/Ts. HRA
Pers. haftender Gesellschafter/Partner liable to unlimited extent:
Cincom Systems Verwaltungsgesellschaft mbH (Amtsgericht Königstein/
Ts. HRB 5069)

More information about the seaside mailing list