[UPHPU] Template engines

John David Anderson uphpu at johndavidanderson.net
Wed Oct 4 16:22:03 MDT 2006


On Oct 4, 2006, at 4:11 PM, Walt Haas wrote:

> Hello All,
>
> I'd be interested to hear from any graphic artists out there what they
> see as the pros and cons of template engines in general, and Smarty in
> particular.  Are these templates easier for an artist to work with
> than the equivalent PHP code?

There seems to be a few reasons people like templating engines: 1-MVC  
type structure, 2-Easy to hand to designers, 3-More "secure", 4-Caching.

They way I see it, <? and ?> are just as easy for designers to  
recognize as XML, Smarty tags, or anything else. I used to be a big  
Smarty fan until I realized that PHP is already a great templating  
engine... and I already know it. :) I got really tired up looking up  
template engine functions that did what PHP could do already. It just  
adds to what you need to know to get things done, and it doesn't' do  
it any faster or better than PHP.

Caching and MVC can be done well by a good framework.

If you're worried that a designer may mess with your code, then you  
shouldn't be working with them anyway.

-- John





More information about the UPHPU mailing list