[Seaside] [ANN] SeasideTemplate

Colin Putney cputney at wiresong.ca
Wed Feb 25 19:04:10 CET 2004


On Feb 22, 2004, at 9:59 AM, Alain Fischer wrote:

> HI Giovanni,
>
> First a small precision, Nori use XML as input this include XHTML.

Correct. The design of Nori is such that it's possible to add other 
parsers to support other formats. Since I want my apps to produce 
compliant XHTML, I never found a need for a straight HTML parser. I 
wouldn't be hard to add, though. I suspect Julian's HTML parser would 
be easy to adapt.

> I have tried Nori first and found that it doesn't respond to my need
> in one of our project. The page where in HTML not XHTML, Nori as I 
> understand
> it is based on manipulating XML DOM which I found not very easy.

Yes. Nori is based on applying Lisp-style lexical macros to the XHTML 
DOM.

It's a bit different from most template systems, so it does take some 
getting used to, like Seaside its self. I've found that it requires 
both less Smalltalk code and less coupling between the code and the 
template. OTOH, you do have to learn the protocol exposed by the DOM, 
since the standard Smalltalk string manipulation library isn't used.

> In this project, we must display customer designed HTML page with 
> embeded data
> from an oodb (GOODS).
> The customer page are modified often and all I have said is that they 
> must
> not modified what is between "<?sst" and "?>" and till now after 
> several
> modification nothing bad appened.

Aha! This is indeed a trade off.

Nori was designed to maximize separation between the template and the 
code, so that designers could work independently from coders. I think 
it does this quite well, but it does require some discipline and 
knowledge on the part of the designers - they have to write well-formed 
XHTML (unless someone implements an HTML parser) and they have to 
understand Nori macros well enough to use them correctly.

A system like Stephen's Smalltalk Server Pages, or SeasideTemplate (if 
I understand correctly), doesn't give the designer as much freedom or 
independence from the programmer, but it also doesn't require them to 
know anything about the templating system.

> SeasideTemplate was simply modeled based on the smalltalk methods I 
> have
> written before I have done this template system. In fact it could be 
> seen
> as some kind of macro for writting smalltalk.

That sounds interesting. I'll have to take a closer look at 
SeasideTemplate.

Colin



More information about the Seaside mailing list