[Seaside] Template system for Seaside + docs
Colin Putney
cputney at wiresong.ca
Fri Mar 26 18:29:51 CET 2004
On Mar 25, 2004, at 6:16 PM, Peter Schuller wrote:
> based on the web site and some posts on the list, I am under the
> impression
> there are now one or more templating systems for Seaside. However I
> have to
> admit to not keeping a very close track on things.
As the author of one of these template systems, I have to say I have
very mixed feelings about this. One the one hand, I generally agree
with Avi's latest blog entry, in that HTML is no longer interesting
from a design point of view, and so markup-independence isn't as
important as it used to be.
(See
http://www.cincomsmalltalk.com/userblogs/avi/blogView?
showComments=true&entry=3257728961)
On the other hand, I don't like HtmlRenderer very much. It works well
with Seaside's tree-of-components architecture, which templates don't,
and it's a lot better than printf(), but it's still
code-that-generates-code, for which I have a general (and possibly
irrational) dislike.
The gripping hand is that I don't have a better idea.
Now, as far as templates go, I'm very pleased with the Nori model. It's
simple and elegant and provides the most separation between HTML design
and application code of any template system I've encountered. It's main
virtue, though, is testability. It provides a framework for unit
testing the user-interfaces of web applications. You can make
high-level assertions like "this component has a link to that other
component," which I find very useful in terms of real-world definitions
of "correct" appearance and behaviour of an interface.
In the long term, this is probably something that should be pulled out
of Nori and incorporated into the main Seaside distribution. I imagine
that a combination Nori-style assertions and a FIT-like component
decorator would be a great testing environment for Seaside apps.
In the short term, I'd recommend HtmlRenderer and CSS design -
SqueakSource is a good example of this done well. If you really do need
a template system, I'll be happy to provide help for any problems you
have with Nori.
Colin
More information about the Seaside
mailing list