Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

jdavidb (1361)

jdavidb
  (email not shown publicly)
http://voiceofjohn.blogspot.com/

J. David Blackstone has a Bachelor of Science in Computer Science and Engineering and nine years of experience at a wireless telecommunications company, where he learned Perl and never looked back. J. David has an advantage in that he works really hard, he has a passion for writing good software, and he knows many of the world's best Perl programmers.

Journal of jdavidb (1361)

Tuesday October 18, 2005
04:48 PM

Templating system du jour

[ #27232 ]

I have never implemented a templating system in Perl.

Yes, I know I've just exposed myself as a novice Perl programmer. :) Let me hasten to clarify that I've never implemented an HTML templating system. I have in fact done a couple of templating-system-like things for code generation and similar tasks, so I suppose I'm not that green.

What I wanted to know is, it's been a while since I read an article on the subject or heard anyone even mention them, so I wanted to know: did any movement ever occur toward a preferred templating system? What's everybody using? If I were going to start an entirely new project tomorrow for a web application, what templating system would you recommend and why?

Clarification: What I am asking is: I have never learned a templating system. Which one should I learn?

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • I've used it for years, and it is quite popular and well-supported. Slash uses it.
  • Like pudge, I tend to use Template Toolkit when I get to choose.

    I use HTML::Mason a lot at $work. It's great for when the templates are going to be maintained by Perl programmers. If HTML authors or graphic designers are going to be editing your templates then I wouldn't recommend Mason.

    The other one that's really worth looking into is Petal [cpan.org]. You can view the templates directly in your browser and they play nicely with GUI HTML editors.

    • Thank you for the tip about Mason, since I was leaning in that direction but am thinking about a project that would need to be usable by non-technical users.

      --
      J. David works really hard, has a passion for writing good software, and knows many of the world's best Perl programmers
      • I picked up TT2 very quickly and I am sure I have only scratched the surface of what it can do.

        I highly recommend it.

      • One more tip with regard to Template Toolkit is that you can configure it to use ASP-style tags. This will then make the templates more compatible with the windows-based GUI HTML editors.
  • Template Toolkit [tt2.org]. Nothing comes close.

    That, or Text::Template [cpan.org].