1. I will not be doing the HTML and graphics stuff. I have someone else who will, but he does not use/know Perl. He uses HTML and PHP and a big fan of CSS (as well as myself). So I need something a HTML/PHP developer can work with.
I think that right there, I would choose HTML::Template.
3. I would like to embed the perl code right into the HTML, as much as possible, and would rather not have to learn a new mini-language, like CGI.pm (my personal opinion).
I think this contradicts requirement number 1. Part of the power of splitting perl from HTML is that you can get your friend to do all the display work while you do all the logic work, and you don't collide by working on the same files. Look up "Model, View, Controller" or "MVC".
That's not to say there aren't valid times for embedding logic within a template (we're doing that at work, but not for CGI). Just that when you already have a division of labour, it's really handy if that division matches the files you're using.
2. I want it to be flexible enough to where I can add additional technology down the road (XML stuff for a RSS newsfeed and a cell phone interface).
You can use HTML::Template for creating XML. May not be the best way, but it will be fast. Depending on what else you're using, you'll want a different URL to get the XML/RSS feed than gets the main pages (even if all the difference is that you're getting a special flag). Your XML/RSS generating routine probably just has to use a different input file (rather than "mainpage.html.template", use "mainpage.rss.template"), and you're done. Alternately, you can just generate the entire XML file using tools such as XML::Twig. Although I'm a huge fan of XML::Twig, I probably would stick to HTML::Template for this.
6. A good debugger would be nice.
I'm not sure about how to debug templates... but, by separating the template from the code, I find that it's pretty easy to debug my CGI code at the commandline (my favourite debugger is "perl -d").
In reply to Re: Help With Choosing a Templating System for my Situation
by Tanktalus
in thread Help With Choosing a Templating System for my Situation
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |