I use to work for a company that helped to invent DOM and XML.

So that was your fault? :)

The key thing about the templating method, and the thing I still like about it most, was that the source and template were both XML.

Sounds a lot like the things that AxKit can do to me, or possibly Apache::ASP with XMLSubs.

The beauty of this approach is that the template and source are well-formed XML/HTML that can be worked on with any respectable HTML/XML tool. If that's important to you, you could check out HTML_Tree as well.

Request comes into Apache
Apache starts the script
The engine checks to see if there is a finished page in the cache, and serves that if there is one
The engine loads the template, and scans it
When it finds an instruction, if goes off and pulls that content in
Finally it caches the page, and sends the finishined page to the browser

Strictly speaking, caching pages is more of a web framework function than a templating tool one. Personally, I like to use mod_proxy for this and take some load off mod_perl. However, AxKit does have this built in.


In reply to Re: Re: Re: I am about to write my very own templating module.. by perrin
in thread I am about to write my very own templating module.. by Aristotle

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.