[Seaside] Rails and Seaside

Pierce Ng pierce+3abb at netmemetic.com
Tue Jan 10 04:34:28 CET 2006

On Mon, Jan 09, 2006 at 02:40:05PM -0500, Christopher Petrilli wrote:
> So along comes TAL and a fully round-trippable templating system.

As it happens, I was off work last week and spent some afternoons
implementing TAL in Squeak.

There are three parts to TAL: 

(I know Christopher here knows this. This is for the other readers. :-)

TAL - For writing such tags: '<h1 tal:content="title">XXX</h1>'.
There are six or seven defined TAL tags.

TALES - A language that specifies what can go between the double
quotes in a TAL tag. A fancy example:
'<h1 tal:content="book/chapter/title | Untitled">XXX</h1>'.

METAL - Supports the definition and application of these templates.

Anyways, I got the TAL bits hanging together and started to write
a SmaCC parser for TALES. Then I realised that I mostly only use 
"tal:content" and "tal:replace", and only ever simple TALES 
expressions like "title".

(I suspect TALES's expressiveness is symbiotic with Zope's "acquisition"
thingy and is overkill in a Smalltalk context.)

Bottomline, I'm not done yet and I will stop once I have the two tags 
that I need.

> Use CSS. If your designers push back, fire them. If your developers
> push back about writing basic HTML, fire them too.

In my case, I'm using TAL for look-and-feel templating of static content. 
Styling remains CSS's job.

But mainly it is just a Smalltalk/SmaCC programming exercise. :-)

- Pierce

Pierce Ng <pierce+3abb at netmemetic.com>

More information about the Seaside mailing list