Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: The hidden charm of Template::Toolkit (and templates generally)

by johnnywang (Priest)
on Jan 07, 2008 at 09:45 UTC ( #660787=note: print w/ replies, xml ) Need Help??


in reply to The hidden charm of Template::Toolkit (and templates generally)

To add another perspective, the same question has been asked for other languages. And in many cases, the "original language" was chosen as the default template system.

For example, PHP itself is already a template system, but other template systems like Smarty have been created. I always felt that's a little over-done, but it does allow better enforcement of the separation of presentation (most of these templates allow embedding of the original language anyway, but discouraged). Some recent frameworks in PHP have chosen to stay with PHP for its view component, at least by default, notebly CakePHP and CMS systems like Drupal and Joomla.

Ruby made the same decision in Rails, where the default template is rhtml/erb, where ruby code is direclty put in html.

Java has jsp where java is directly embedded, but then people have been arguing that servlet plus a template system like Velocity is philosophically better.

Back to perl, TT does give me a much warmer-fuzzier feeling. I also like the fact that I can, and do, use it outside of the web environment.


Comment on Re: The hidden charm of Template::Toolkit (and templates generally)
Re^2: The hidden charm of Template::Toolkit (and templates generally)
by exussum0 (Vicar) on Jan 07, 2008 at 12:52 UTC
    To clarify:

    One doesn't have to put java code INTO JSP to make it functional. You can make it act quite like velocity using tags alone.

    The compilation of JSP->java->bytecode is equivalent to a servlet that compiles a velocity template into memory, ala perl.

    Only diff between velocity and JSP is that your base language set is limited.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2014-10-23 03:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (123 votes), past polls