Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

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)

Replies are listed 'Best First'.
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?

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2023-06-02 23:06 GMT
Find Nodes?
    Voting Booth?
    How often do you go to conferences?

    Results (5 votes). Check out past polls.