[Seaside] Seaside + SSP

Avi Bryant seaside@lists.squeakfoundation.org
Thu Jan 16 21:40:42 CET 2003


On Thu, 16 Jan 2003, Stephen Pair wrote:

> This of course bypasses the formatting supplied by the WAHtmlGenerator,
> which would eliminate the possibility of re-directing the render method
> to some non-html output.  What would be really cool is if we could make
> a parser that would parse the HTML (or other markup) in the SSP method
> and spit out bytecodes that call methods on the HTML generator.  Then
> you could conventiently write rendering methods in marked up text, yet
> still be able to re-direct output to a different markup language.

Yeah, I played with something like that at one point (not generating
bytecodes directly, just doing a source-to-source transform).  The problem
is that the interesting part is not HtmlGenerator but HtmlRenderer, and so
you have to find ways of representing things like anchorWithAction:text:
in the html.  But I still think it would be a decent way of adding
templating to the current system.

I've also been doing experiments recently with replacing HtmlGenerator
with an HtmlBuilder class, that has the same interface but generates a DOM
tree instead of directly printing to a stream.  Surprisingly, it doesn't
end up being measurably slower (even after rendering the tree down to
HTML), though it definitely creates more garbage.  My guess is that this
might allow more flexible templating approaches...




More information about the Seaside mailing list