Snails are still slow, even when you compare them to slugs.

I don't agree with this. Speed is relative, and snails are only slow if you have something else much faster to compare them to, like a jet engine. Embperl and Apache::ASP are arguably significantly faster, but not a lot faster. Raw print statements are a lot faster, but sacrifice most of the functionality that leads people to a templating system in the first place.

Regarding the code for handling tables in a template, this is what plugins are for: you write the tricky part in Perl, and the template author still gets to control things like how many columns there are. A good HTML coder should be able to deal with simple loops and conditionals. I used the table plugin and date plugin successfully for this kind of thing.

Of course you could also write a module for this and use it from Mason or Apache::ASP, but I find that people don't usually do that when it's so easy to put the perl code right in the template.

Not every HTML coder in the world can handle templating. I've had nothing but success with TT, but I can imagine some people just won't get it. The key things that I did that helped were to provide documentation of the data being passed in (as oppposed to handing them sample templates to pretty up) and to give them a simple template tester that allowed them to type in test data (in the format that the real app would send) and run it through a TT template. This let them experiment easily.


In reply to Re^4: Model-View-Controller: Template Toolkit vs. XSLT by perrin
in thread Model-View-Controller: Template Toolkit vs. XSLT by kvale

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.