The new issue (#58) of UK magazine Linux Format contains a review of the Badger book. While they pick up on a few problems, the review is generally very positive (they give it 9/10). The last paragraph says this:
This is really an exciting area for Perl and, and these three authors are clearly passionate about the topic. The writing is sharp, to the point and - yes, this might sound odd about a topic like Perl templating - exciting. Any monkey could write a book on TT in 100 pages discussing what it does and how it works, but what these three have managed to put together is an explosion of ideas and evolutionary 'wow factor' that makes compelling reading for any Perl programmer who has looked at JSP and felt a twinge of envy.
"An explosion of ideas and evolutionary 'wow factor'" - I like that a lot :)
Re:Mason or TT
davorg on 2004-09-04T20:41:10
Don't ask me for advice - I'm a bit biased:) Advice?
zatoichi on 2004-09-04T20:50:23
Then how about this. What do you consider to be TT's strengths? Right now I am using CGI-Application with HTML-Template in a CGI environment. I am moving those to a mod_perl setup.Re:Advice?
TeeJay on 2004-09-14T11:56:52
Its quicker to outline HTML::Template's strengths - if your problem doesn't fit into the small space that H::T works with then TT is the only option.H::T works nicely if you have only require very simple and very limited flows or constructs within a template, it also only really works where your data (no objects or classes) structure is a hash of arrays of hashes.
Beyond that and it becomes a very specific shaped hole that few problem shapes will fit into.
TT allows you to pass in objects and interact with them, it also allows you to have scoping, local values, plugins, complex flows, etc in your templates.
The importance of being able to pass in objects or classes and call methods on them from within the template can't be over-stated. It means you don't have to waste time crafting a data structure exactly as the template requires it (crafting data structures for H::T can be a real PITA) and can change the template or code without each affecting the other detrimentally.
TT isn't slow or inefficient - any gains in speed or performance you can theoretically get from H::T are so small as to not matter - I can use TT with mod_perl and maypole to deploy a complex site within a tiny Virtual Linux from bytemark.co.uk.
In summary, H::T will quickly eat developer time as soon as you need to write anything that doesn't fit its very small problem space exactly, TT will allow you to develop your application quicker and provide real seperation between the templates and your code as well as allowing you to use many plugins and frameworks on CPAN.
I've used TT and H::T for big projects, the former has never been a problem, the latter was a frequent cause of pain.
... compelling reading for any Perl programmer who has looked at JSP and felt a twinge of envy
JSP has never caused me the slightest twinge of envy. I did a lot of ASP coding when it was new and cool so I'm very familiar with the type of spaghetti code that almost inevitably results. JSP is a direct rip of the ASP concept but with the convenient, dynamic scripting language replaced with Java - the worst of both worlds!
I've found TT and Petal templates supported by a mostly invisible mod_perl framework to be vastly superior to JSP.