Monday, January 30, 2006

php as a templating system

some php programmers used to use templating systems like Smarty, phpbb templates or XTemplate to separate the php codes (the logic) from HTML (the view) .

but php itself is a templating language , so using another templating language with it is a waste of this feature in php.

so there is some projects trying to reclaim php to use it as a good templating system such like ( Savant and SimpleT )

i like Savant and you will find many samples and plugins on it's web site.

but why i have to use something like Savant to do the same work ?!!
just as this will improve the performance of your application.

in the other templating systems :
1- the code of the templating system will be compiled by the php interpreter on run time .
2- the templating system will compile the templates .

but with something like Savant you will have one cycle of compilations as we are using php itself for control statments and place holders.

so, are you going to use your templating system again?!! ;)


Post a Comment

<< Home