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

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
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.


In reply to Re5: pulling content from db - is it a good idea? by dragonchild
in thread pulling content from db - is it a good idea? by kiat

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (9)
As of 2024-03-28 09:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found