in reply to Perl, Web Apps, HTML::Template, HTML::Mason and the future

The simple questions are the most difficult to answer.

The traditional answer would probably be CGI and (m)any of its derived modules (to manage sessions, authentication and authorization, ...), DBI and your choice of Templating System (Template::Toolkit springs to mind).

A more modern answer would be Catalyst and any related modules in that namespace to handle your particular challenge. Again a templating system (see above) and DBIx::Class if you need a database.

And I am probably forgetting a thousand other modules you cannot do without as my brethren will certainly point out!

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

  • Comment on Re: Perl, Web Apps, HTML::Template, HTML::Mason and the future

Replies are listed 'Best First'.
Re^2: Perl, Web Apps, HTML::Template, HTML::Mason and the future
by novastorm0 (Beadle) on Jun 12, 2008 at 00:16 UTC
    Catalyst looks very interesting. I've heard of it before but dismissed it fairly quickly (I didn't know much Perl at the time) DBIx is in. Now just to pick a template system..Template Toolkit seems to be popular. Do you have anything against HTML::Template for simple applications?

      Templating systems are like religions, so the answer strongly depends on who you ask, or who replies... ;)

      It's probably a good idea to try a few yourself to see which approach you like best.  This classic article might serve as a good introduction.

      I have nothing against HTML::Template and I'm quite sure that it can handle much more than simple applications.

      Template::Toolkit on the other hand is a more general templating solution which will equally well handle non-HTML / non-Web matters.

      I use it regularly to write LaTex files which when rendered make nice lay-outed PDF-files. Although not impossible to do, it would require more effort to do so from a less performant templating system.

      Its biggest strength is the way it can handle easily and elegantly, all kinds of data-structures (such as hashes of arrays of hashes of hashes of ...) and can use most of the standard Perl-modules (CGI, DBI, ...) directly from within itself. And before someone complains and starts a holy flame war: this indeed breaks the holy law of division of concerns and allows you to sneak in programming into your display layer, but sometimes it is damn handy to do so ...

      CountZero

      A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James