Taku Nakajima <tnakajima / brain-tokyo.jp> wrote in message news:<200207190226.LAA24643 / brain-tokyo.jp>...
> Amrita is a a html/xhtml template library for Ruby. 
> It makes html documents from a template and a model data.

This is a really cool, clean approach - I very much like being able to
see the skeleton of the page without looking at the template (most
templating systems require starting by reading the template and
piecing everything together from there).

To throw out a couple of thoughts:

- It would be cool during development to have the template completely
inferred from the data; obviously it would have to make some arbitrary
choices (lists vs. tables, anchors vs. buttons) but it would probably
be good enough to get a prototype up for simple sites.

- If I were using it, I'd want to mix callbacks in for form elements
and links, so that you could do, say,

i = 0
data = {"count" => i,
        "increment" => callback{i += 1},
        "decrement" => callback{i -= 1}}

and then have a template like

<h1 id="count">
<a id="increment">++</a> <a id="decrement">--</a>

and have it do the obvious thing.  Obviously this requires a lot more
infrastructure than just Amrita, but it's completely doable.

Avi