Yaws API discussion

Chris Pressey <>
Wed Jul 17 01:26:55 CEST 2002


On Tue, 16 Jul 2002 10:09:14 -0700 (PDT)
Eric Merritt <> wrote:

>  Well in defense of klacke, he achieved his design
> goals. Which is more then I can say for many projects.
> The resultof his efforts is exaclty what he wanted.

According to motivation.yaws, he wanted something less ad-hoc than PHP,
and yaws is that.

(But I want something even less ad-hoc than yaws :)

> [snip]
>   As far as I am concerned this is the right choice.
> But dont forget that you need to support lists as
> well. Also are you going to go with the specialed
> template language approach or the tag approach? If you
> go with the tag approach I would suggest that you use
> something other then <> as tag delimiters. Awhile back
> I wrote a custom template engine for a client and made
> use of [] for tag delimiters. It made the parser much
> easier to write and the tags tended to stand out
> pretty well against the html.

Currently I'm using tags formatted like ${This}, because it evolved from
some (now quite old) Perl CGI code.  They stand out quite well.

Iterating over lists is currently done in the Erlang handlers (in .beam
files) and the whole table is exported as a single tag.  This is less than
ideal since it hard-codes things like cell alignment.  It's also not very
scaleable, but who wants to see an HTML table with a million cells in it
anyway?  Better to break it up into many smaller pages.

I'm intrigued by Zope's "format by example" approach, and if I'm going to
improve on the templating I might go in that direction...

-Chris



More information about the erlang-questions mailing list