http://qs1969.pair.com?node_id=309881


in reply to Re: Re: Re: Re: pulling content from db - is it a good idea?
in thread pulling content from db - is it a good idea?

HTML::Template is generally considered the easiest templating module to get up and running right now. It is definitely less versatile, but its design goals are also less ambitious. It (unlike Mason, TT, or ASP) is not a content-management system.

H::T also has the neat benefit of allowing the HTML to maintained by a non-Perl developer. Mason and TT require a larger learning curve for the template maintainers. They also require more design-time up-front.

It's not just a matter of more used to this or that ... it's a matter of what's the right tool for the job. I'll give you an example.

I'm currently in the midst of converting a number of reports from Oracle's ReportBuilder to Perl. I chose HTML::Template for the HTML generation. Reasons?

  1. I needed to get something up and running right now. H::T is better for that (and the TT and Mason people will tell you that, too).
  2. I had to generate PDF, Excel, and graphs, with the same data. I may be a little out of touch, but I'm pretty sure neither Mason nor TT will do that. H::T has a few friends that will. (PDF::Template, Excel::Template, and the soon-to-be-released Graph::Template.)
  3. I'm not going to maintain the HTML - the site designers will.

Now, in a few months when things stabilise, it's very possible we might switch to Mason or TT. We might need that content management support. Then again, we might not. (The project isn't very well defined.)

------
We are the carpenters and bricklayers of the Information Age.

The idea is a little like C++ templates, except not quite so brain-meltingly complicated. -- TheDamian, Exegesis 6

... strings and arrays will suffice. As they are easily available as native data types in any sane language, ... - blokhead, speaking on evolutionary algorithms

Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.