0 notes &
How much code is too much code in a web template?
I need your help here.

I’ve been working on my web template engine and I can’t decide exactly what sort of things should be allowed in templates. I think most people agree that these things should be available:
- Property Access
- if/else/else if Branching
- Iteration over loops
- Formatting
- Math operations (think if (foo > 10 + bar))
It gets a little foggier here:
- Method Invocation
- Variable Declaration
- Variable Setting
- Method Declaration
After that its pretty much full on double rainbow access to the underlying language.
{{
if (count > foobar ()) {
Response.Write ("foo");
}
}}
I think most people agree that there should be a line drawn and code should be kept out of the templates, but where do you feel the template engine should draw the line?