[Seaside] Re: Seaside Digest, Vol 30, Issue 23

Avi Bryant avi.bryant at gmail.com
Sun Jun 19 15:17:35 CEST 2005


On 6/18/05, Adnan Zaman <adnanzaman at yahoo.com> wrote:
> Hello all,
> 
> I am a newbie to SeaSide 2.5 and was wondering if
> there was some support for integrating html templates
> in it.
> 
> After doing some search, I did find such a package
> called NORI but somehow I can't find it on squeakmap.
> 
> Any ideas on how to get this package or some other
> package with similar functionality?

Nori hasn't been an active project for a while (Colin moved jobs not
long after starting it and so it was never completed or maintained). 
One of the main goals of Nori was to make Seaside apps more testable,
a need which is now well met by the SeasideTesting package.  However,
the templating part of things dropped by the wayside.

It's worth asking what it is you want a templating system for - most
of us have, I think, found workflows that work as well or better than
templates using Seaside's combination of CSS and programmatic HTML
generation, and it might be something you want to try as well.

I've also been doing some thinking about  non-traditional ways of
integrating templates into Seaside: somewhere I have the beginnings of
a package called MicroTemplates, which is an attempt to integrate very
small, simple (no conditionals or loops etc) snippets of
designer-controlled HTML into the overall programmer-controller HTML
generation.  Usage might look something like this (this is using the
new Canvas style of rendering):

html template name: 'listPage'; replace: #body with: [
  html list items: someCollection do:
      [:ea |
      html template
         name: 'listItem';
         replace: #name with: ea name;
         replace #description with: ea description]
]

And then the designer might provide:

listPage.html
-----
<html>
<body>
<h1>The List</h1>
{{body}}
</body>
</html>

listItem.html
-------
<b>{{name}}</b>
<p>{{description}}</p>

If this sounds interesting to people maybe I'll take the time to work
more on it (or better yet, maybe someone else will take the idea and
run with it...)

Avi


More information about the Seaside mailing list