Slash Boxes
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 ]

Ovid (2709)

  (email not shown publicly)
AOL IM: ovidperl (Add Buddy, Send Message)

Stuff with the Perl Foundation. A couple of patches in the Perl core. A few CPAN modules. That about sums it up.

Journal of Ovid (2709)

Tuesday December 17, 2002
06:10 PM

Skipping Template Toolkit

[ #9517 ]

We have a site that has many common elements, so there were some suggestions to use Template Toolkit. The programmer working on the pointed out that very little of the site is dynamic, so Template Toolkit didn't seem to offer any advantages over server side includes. Today, I find myself in the process of making these changes while that programmer is on vacation. I went into Apache's httpd.conf and enabled the includes (first time I've ever done that) and am now writing scripts to automate stripping out the common HTML (identified by hand), replacing it with the appropriate SSI and rename all of the pages with .shtml extensions. It makes a nice change of pace from a lot of the database driven stuff that I do.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • You can use TT to prepare static content as well. A lot of people use server-side includes to assemble pages of static content (navbar here, disclaimer there, etc.). Having your httpd look at the HTML files instead of simply sending them back consumes cycles. A lot of sites preprocess their HTML--an offline make install type process builds the static content from the components. Template Toolkit can definitely do this.


    • Also, it renders your content deliverable by the sendfile(2) system call, which really speeds things up in terms of delivery.

      Anbother thing with a "make install" type of system is that you can prepare pre-gzipped content for mod_gzip in order to save yourself bandwidth.


  • I'm against .shtml because it's a pain if you ever want to move away from SSI.

    Using XBitHack is nicer plus it allows caching to work better.