So here I present to you Moyer's Eleventh Rule of Templating Languages. "Any sufficiently complicated templating language contains an ad hoc, informally-specified, bug-ridden, slow implementation of half of Perl"
Very true. Which is why I prefer to put plain perl/ruby/whatever code in the templates ala PHP/JSP over, well, any template system I've used.

That's not to say that template systems are the best way to create dynamic apps. I've been messing with Common Lisp + cl-who which works more or less like CGI's HTML generation modules, but with Lisp's syntax. So far it's a joy to use: you can get as detailed as possible and the code is a both smaller and easier to read than the equivalent HTML and you get all of Lisp's power (including macros) in the bargain.

In the end, I'm pretty sure the "separate code from presentation" guys have it all wrong. Just take a look at the enormous amount of code that gets generated when you want to use JSP's taglibs, for instance.

You may want to separate the view from the lower level / model code, but there's no good reason I can see to even try to "keep the code out of the view".


In reply to Re: Template modules, logic, and SOC by Joost
in thread Template modules, logic, and SOC by arbingersys

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.