Re: Contribution for PECL
| From: | Maxx | Date: | Sat, 28 Dec 2002 02:34:25 +0000 |
| Subject: | Re: Contribution for PECL | ||
| References: | 1 2 3 4 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-11859@lists.php.net to get a copy of this message | ||
> > No, the extension is 100% independent. It uses "Tuned Boyer-Moore"
search to
> > find text patterns in a template.
>
> why? chances are pretty likely that any system that is compiling your
extension
> would have flex and bison (which are required to compile php). flex and
bison
> also on the whole generate much faster code (well, flex is slightly
slower, bison
> is much faster.)
I think something like flex or bison is too much for this particular task. A
good searching algorythm tightly integrated with internal data presentation
seemed to be the best soution for the problem.
> Also, have you seen Smarty? http://smarty.php.net/
Yes, I've checked out the most part of known template engines before
starting the project and during developing process.
php_templates' synthax is very simple because it keeps Presentation level
free of any kind of logic, leaving it for the Code (Business Logic) level of
an application. I would call it a Classical approach to N-tier architecture.
Smarty is a one of the best engines I've ever seen, but it has a totally
different ideology of templating, and can not be compared with
php_templates. Despite of the fact that it has too much code to be parsed
for every request, and therefore needs something like ZendCache to be
installed on the server for faster work, this is a one of "language inside
of a language" projects. You still have to be a programmer to create
Smarty's templates.
This topic is being discussed continuously among web developers and can be
considered as yet another never-ending ideological (religious?) war like
"Linux vs. FreeBSD", "Intel vs. AMD", etc. I will gladly discuss this issue
with you personally, but I'm afraid [pear-dev] is not the appropriate place
for this kind of discussions.