Re: Template system in PHP

From: Date: Wed, 13 Feb 2008 00:02:38 +0000
Subject: Re: Template system in PHP
References: 1 2 3 4 5 6 7 8 9 10  Groups: php.general 
Request: Send a blank email to php-general+get-269222@lists.php.net to get a copy of this message
On 2/12/08, Greg Donald <gdonald@gmail.com> wrote: > REST is the new SOAP. Yaml is the new XML. I'm guessing this news > just hasn't made it into any PHP frameworks yet. REST for the win. SOAP is best left for the bathtub. as far as templating engines go, a while back i wanted to see if i could find the best template engine to suit all my needs. what i wind up finding was 100's of PHP-based templating engines, a LOT of them related to each other in some way. what you wind up doing is learning a proprietary language that is basically mimicing the constructs of PHP... and in theory, PHP -is- a templating language already. so after lots of digging and reading, i've come to the conclusion that packages like wordpress have it best: just let people write PHP. the whole "designers shouldn't have to learn PHP" is bunk, because they'll have to learn Smarty, or XSL, or some other proprietary language. i would say though that as far as template languages go, XSL/XML seems to be a decent fit. although XSL can be annoying (and processor intensive), it's a perfect fit of data in XML that can be validated and a template in XSL that can be validated and has presentation logic, variables and is a standard (published by W3C) which is a lot farther than any of these other templating languages can go.

« previous php.general (#269222) next »