in reply to HTML::Template - what's the rule of thumb?
We use HTML::Template alot at my work, and i try to follow this general process:
We use mod_perl, so our templates are cached in the server's process memory. But even with pre-parsed & cached templates, I make an effort to never let my templates get to complex. Complex templates not only have a higher initial parse overhead (longer startup time for mod_perl server/process and slow pages for vanilla CGI), but they tend to be more complex (read: slow) to execute as well. And most importantly, a highly complex template will increase the coupling between your back-end Perl logic and your front end HTML::Template logic which defeats the whole idea of seperation and you are back where you started.
Oh yeah, and i find that the ability of a non-programmer to handle HTML::Templates decreases in relation to the templates complexity. If you are not only trying to seperate display from logic, but trying to seperate tasks across individuals, your better off keeping it simple.
In the end, there is no direct relationship between our perl and our tmpl files, but this has more to do with our particular use of mod_perl (we use handlers not Apache::Registry, and have a whole OO dispatch table architecture set up going on)
Anyway, hope this helps.
-stvn
|
---|