mindplay wrote:Hello,
I would like to announce my template engine, Outline, which is now available:
http://outline.mindplay.dk
This is quite different from most template engines you might have seen. Instead of inventing a whole new syntax, it borrows from php, but also adds useful shortcuts, such as the modifier syntax, which is borrowed from Smarty.
I have already visit your Project (google code).
This was when I did my latest survey and research of PHP Template Engines.
But I cant give any rview or verdict
as you, as far as I know, havent had the courage to publish any code.
I did look for ZIP file in the spirit of OPEN Source, ... but to no luck.
I have though, the scripts of many other similar Template Engines.
Such that I can download and examine and tryout, if I find it interesting.
Among ideas in Templating using PHP, I agree with the opinions of Author of an old template Engine:
bTemplate
http://massassi.com/bTemplate/
In short, if you use a template engine advanced and all such syntax machinery
you CREATE Overhead load onto your scripts .... slownig down.
PHP functions in themselves are excellent in taking strings and display them.
This is what PHP language is a tool for from the first beginning:
Pre Hyper text Processor.
I think you should have a read of the an updated Conclusion of bTemplate author.
He has revised some ideas and his opinion is most sound and good,
if you ask me.
Template Engines
Note: This article has been updated. The old version is available here.
License Note: Please consider the code in this article public domain.
In general, template engines are a "good thing." I say that as a long time PHP/perl programmer, user of many template engines (fastTemplate, Smarty, perl's HTML::Template), and author of my own, bTemplate.
However, after some long discussions with a co-worker,
I've decided that the vast majority of template engines (including my own) simply have it wrong.
I think the one exception to this rule would be Smarty,
although I think it's simply too big,
and considering the rest of this article, pretty pointless.
This document © Copyright 2003 Brian Lozier
My own latest website project, uses my Own very basic Template class.
Has got only 3 methods:
- __construct()
- assign( array)
- parse ('tpl file name')
use-age:
<?php
$tpl = new template;
$tpl->assign(array('token', 'replace values' ....))
$output = $tpl->parse( 'template-file.tpl')
echo $output; // display HTML
?>
Web source Brian Article:
http://massassi.com/php/articles/template_engines/
regars
halojoy