Re: template engine...why???

From: Date: Wed, 30 Apr 2003 16:56:45 +0000
Subject: Re: template engine...why???
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-145820@lists.php.net to get a copy of this message
I agree with Tom, I also use a template system is to give the layout designers complete freedom regarding the look without the need to teach them PHP.. I just need to give them few facts about my template mechanism and give them a list of template-codes which are understandable and similar to HTML code they already know and then live my life happier. Yes PHP is more like a template thing itself, and when we use another template engine we're just making an extra layer but sometimes it worth it! I beleive PHP is a very strong language so template-programmers can find a lot of ways to keep the performance and speed all in a good level. Regards, VisualMind ----- Original Message ----- From: "Tom Rogers" <trogers@kwikin.com> To: "Ryan A" <ryan@jumac.com> Cc: <php-general@lists.php.net> Sent: Wednesday, April 30, 2003 7:11 PM Subject: Re: [PHP] template engine...why??? > Hi, > > Wednesday, April 30, 2003, 11:18:21 AM, you wrote: > RA> Hi, > RA> I'm a kind of newbie to PHP but have been with Java Servlets for years...I > RA> would appreciate it if someone would answer this question for me please. > > RA> Why use a template engine? > > RA> isnt it much easier to include a header and footer file with "include"? > > RA> eg: > RA> <?php include "headerblah.php" ?> > > RA> thats soooo much easier that learning some templating "language"...isnt it? > RA> I visited the smarty template site..... > > RA> Cheers, > RA> -Ryan > > The reason I use a template system is to allow the layout designer > complete freedom in how the thing will look. PHP supplies the logic > but final layout is developed independently. I use my own system which > adds about 8 - 10ms to the page generation (the whole class is 60 > lines of code), something i can live with for the added flexibility. > One big advantage is we can throw away the header, body and footer > includes and just use one layout file which is a lot easier to > maintain, its very easy on a complicated site which uses a lot of > tables to get lost in the includes. As for learning a new language I get by with just 3 commands > and one of those is redundent. What I found is a lot of template > systems are trying to be too clever and adding a lot of logic which > PHP is better suited to handling outside of html. > The bottom line is go with what works for you and your needs but > templates sure made my life easier. > > -- > regards, > Tom > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.general (#145820) next »