[Seaside] using inheritance to describe look'n'feel

Colin Putney cputney at wiresong.ca
Mon Jun 16 19:33:29 CEST 2003


On Mon, 16 Jun 2003, Paul Mitchell-Gears wrote:

> Class WADialog gives you basic Dialog behaviour. It seems to me that I 
> might
> like to subclass this in two orthogonal directions: either (1) to give
> different look'n'feels, ie by overriding #renderContentOn, or (2) to 
> give
> extra behaviour on top of the standard Dialog (ie build something more
> complex, that also IS-A Dialog).
>
> I have the feeling that (2) is the 'real' inheritance tree here. Which
> suggests to me that perhaps the variation allowed by (1), which is also
> necessary, should be modelled by delegation rather than inheritance.
>
> But what would this look like? It might look like a separate View 
> class per
> Controller. But I seem to remember reading somewhere on this list that 
> you
> deliberately decided to merge the V and C of MVC into seaside's 
> 'Component'
> concept.


Avi has been focusing on CSS, and asked:

> Anyone else have thoughts here?

<sigh> I just can't sit on this any longer.

Another option is templates, of course. I've been working on a template 
system for Seaside 2, with an emphasis on testable components. I'll be 
giving a talk about it at Smalltalk Solutions in July and hope to have 
a first release done before then.

Templates essentially re-separate Components into Controllers and 
Views, so that the controller hierarchy satisfies your need for (2) 
above. You can, of course, write new views if you like, but if I've 
done it right, you should be able to vary the look and feel just by 
changing the template.

At this point, the basics are in place, and I'm trying to build a 
reasonably complex interface with it so as to work the kinks out. I'll 
keep you all posted.

Cheers,

Colin



More information about the Seaside mailing list