[Seaside] new header api

Avi Bryant avi.bryant at gmail.com
Thu Oct 26 19:55:58 UTC 2006


On Oct 26, 2006, at 11:45 AM, Philippe Marschall wrote:

> Hi
>
> Now that both Seaside 2.7a1 and 2.6b1 have the "new" header API i  
> think its time
> to write something short about it so people don't have to ask.
>
> The old header API was suffering from the same problems as the old
> renderer API. Just to add an stylesheet with media and title you had
> to copy and paste about 4 methods. Addional 4 for alternate
> stylesheets. If you wanted a new conditional import you needed to copy
> and paste a 3 LOC method.  And so on. So we followed the same path
> like the Canvas API and made use of cascades.
>
> The new API offers four base methods to create elements
> - base, for base elements
> - if, for conditional imports
> - link, for link elements
> - meta, for meta elements
> - script, for script elements
>
> Most of the time will want to use one of these two convenience  
> methods:
> - javascript, for javascripts
> - stylesheet, for css stylesheets

Looks great, guys.

Avi


More information about the Seaside mailing list