You are here: Re: templates? « PHP Programming Language « IT news, forums, messages
Re: templates?

Posted by Mike Willbanks on 10/01/29 11:17

> 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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация