[rt-devel] Offtopic: RT for TT2?

Jonas Liljegren jonas at liljegren.org
Sun Mar 11 10:53:20 EST 2001


I may take the time to convert RT2 to Template Toolkit...


ivan <ivan at 420.am> writes:

> This is probably off-topic for rt-deve, but I am curious:
> 
> Given
> http://forum.swarthmore.edu/epigone/modperl/frahthonbror/19990525144012.8806.qmail@plover.com
> 
> Is TT2 a "little language" or "eval" templating system?

It can be anything you want it to be. ;-)


The TT2 module is called 'Template'.  It's a new perl-like language,
but supports (but discurage) embedded perl code.

The main philosophy is to separate code and presentation (and data). 


There are two styles of using templates (in the non-eval group): 

 1. Prepare all the data and then insert it into the template

 2. Call the template and let the template request data

TT2 kan do both.


Some time ago, (a year now?) I did a survey of the existing template
solutions.  All the existing templates (in the non-eval group) missed
one or more features.  TT2 has them all, and much much more.

Here is my original letter:

        http://jonas.liljegren.org/perl/ideas/letter.txt


And here is the main comparsion table:

Parameters in the template used as input for the data generation  .......
Maintained (updated in 1999)  ...................................       |
File inclusion  .........................................       |       |
Configurable interface  .........................       |       |       |
Conditionals  ...........................       |       |       |       |
Iterations  .....................       |       |       |       |       |
Output filters  .........       |       |       |       |       |       |
                        |       |       |       |       |       |       |

CGI::FastTemplate       -       -       -       -       -       M       -
HTML::Subtext           -       -       -       -       -       M       -
HTML::Template          -       I       -       -       -       M       -
Text::BasicTemplate     -       -       C       -       -       M       -
Text::Boilerplate       -       I       C       C       -       -       -
Text::Bind              -       -       -       -       F       M       -
Text::FillIn            -       -       -       C       -       M       P
Text::Merge             O       -       C       -       -       M       -
Text::MetaText          O       -       C       C       F       -       P




And you can of course use TT2 as a mod-perl handler, making it similar
to PHP, but both more powerful and much easier.

-- 
/ Jonas  -  http://jonas.liljegren.org/myself/en/index.html





More information about the Rt-devel mailing list