Re: templates?
- From: Mike Willbanks <pencap@xxxxxxxxx>
- Date: Mon, 30 May 2005 09:52:09 -0500
Some do not have a specific language so you cannot do complex things.
For example it's not easy to display a table (sometimes you need to have a specific template to display the TR HTML tags...).
, it's not easy to use a different color to display a table row according to a parameter etc etc
Some have a specific language, like Smarty.
My question is, what is the interest to learn another language?? What is the real interest of Smarty (or other one)?
For me I have always considered this a loss. Why add another language ontop of PHP? To me I think it is easier to have PHP just render everything instead of having to learn more templating languages.
The only thing I use templates for currently is a custom made XML based system. Takes the sections of an XML document combines them and then parses using PHP.
All variables are exported to that template so then you have a set of like 5 variables for that page. So therefore all the main logic is contained in its pure PHP form and then the templates are seperated but the variables remain the same.
Ex:
each page calls index.php which checks account validity, session, and template file to include. Runs through the build process if there isn't one in the cache or if there is an updated file.
now the file is build and cached, it is now included and all the variables are extacted to that file. Now I simply use PHP. This saves rendering time, also while teaching the web designer fundimental programming. (He is only going to be working with simple items)
Mike .
- References:
- templates?
- From: WebRod
- templates?
- Prev by Date: Re: How to create html list from such array ?
- Next by Date: index page query from PHP newbie
- Previous by thread: Re: templates?
- Next by thread: Re: templates?
- Index(es):
Relevant Pages
|