Contribution for PECL
| From: | Maxx | Date: | Sat, 28 Dec 2002 01:02:01 +0000 |
| Subject: | Contribution for PECL | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-11849@lists.php.net to get a copy of this message | ||
Hi everyone,
More than a year ago I've started a project of yet another (don't be
confused with YATS) HTML-template parsing engine. I wanted to get the
maximum of perfomance, so I made it as an extension to PHP - php_templates.
Since then I used it in a few dozens of different sized projects where I
took part, fixed some bugs, added some new features, and now the extension
seems to be stable and mature enough to be used in almost any kind of a
project.
Other people has began to show their interest to the engine. It has appeared
in ports collection of FreeBSD. So, I think about contributing my work
directly to the PHP community.
Some of its features are:
- compatible with any version of PHP starting with 4.0.6
- LGPL license
- does not depend on any of external libraries, such as PCRE
- some advanced algorythms were used in the code to speed the thing up and
get rid of any kind of time-consuming text search'n'replace operation
- a simple but flexible API
- templates without any kind of "language inside of a language" logic
- configurable template tags and dynamic blocks format (i.e. you may even
create templates with Macromedia DreamWeaver)
- unlimited levels of dynamic blocks nesting (does it really need to be
said?)
- effective error messaging (outputs number of line with an error in a
template)
- supports "Controller driven by a View" mechanism when a template
configures its parsing script
er...actually, I wasn't going to waste your time till the next Christmas =)
to those who say "PHP _is_ a template engine itself": benchmarks showed
php_templates is 30-50% faster than PHP on the same template file
to those who use XSLT: there are many people who need something more simple.
That's it. Your comments are welcomed.
Happy New Year!
Maxx