Shu-yu Guo wrote:
> On Mon, Mar 08, 2004 at 07:19:40AM +0900, Andreas Schwarz wrote:
>> > At that point, it seems smarter to shift your focus from "HTML templates to 
>> > put my Ruby in" to "Ruby class that puts out HTML".
>> 
>> The problem is that the methods generating html could end up containing
>> more and more of the functional core of the application, so that they
>> aren't easily exchangeable. But I will think about it again...
>> 
> 
> I agree with Andreas here. Templates are templates, there should be no logic
> in them; they are only presentation. You shouldn't ask your template writers
> to learn your programming language just to change how your software looks. If
> your templates become your code, there is no point in having the templates,
> just go ahead and embed HTML.
                    ^^^^^^^^^^
I did that in the last forum i wrote, and I hate it :)

> While it is a given that your templates will grow complex, they do not
> necessarily have to have code in them.

Most template systems have "if" constructs, iterators etc...

> I think a system like Amrita demonstrates that well.

I won't use Amrita because it seems to be a real memory and cpu hog
(haven't tried the latest version though), and I really don't see the
point in parsing the whole template with rexml just to exchange a few
strings. For big complex sites and with caching, maybe - but not for a
forum that is intended to have speed as its main (but I hope not only)
feature.