Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re5: pulling content from db - is it a good idea?

by dragonchild (Archbishop)
on Nov 25, 2003 at 13:04 UTC ( #309881=note: print w/replies, xml ) Need Help??


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.

  • Comment on Re5: pulling content from db - is it a good idea?

Replies are listed 'Best First'.
Re: Re5: pulling content from db - is it a good idea?
by barrd (Canon) on Nov 25, 2003 at 14:35 UTC
    Very nicely and succinctly put Sir,
    I too am a great exponent of HTML::Template for pretty much all the reasons you have pointed out above. Theres another chap here that waxes lyrical about it and I always read their H::T posts with glee as I learn more and useful ways to extend the possibilities that it is capable of covering.

    I also agree that the other 'tools' out there have their uses in the right place (or right job) as well.

    Update: Added link to referenced node

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://309881]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (8)
As of 2022-06-29 19:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My most frequent journeys are powered by:









    Results (97 votes). Check out past polls.

    Notices?