How about using templates (e.g. Smarty) to separate PHP code from HTML? It shouldn't be complicated to use templates with current code
I fail to see how that would make things easier.
It's like writing code for a script that will write code for a script.
Wouldn't it be just as easy to create a home grown template that does the same thing? Without going through two or three different scripts to get the same output?
in Smarty it would be like:
in a home grown template it would be like:
<div><?php echo $foo; ?></div>
Don't get me wrong, I'm all for saving keystrokes, but if those savings come at the price of an overly bloated product, then no thanks.
Or am I missing something?
Sorry, but templates are standard for all "hi-end" applications. Templates allow to have separately code and "visualisation".
Try http://smarty.php.net/whyuse.php :)
I understand the need for a separation of design and structure. But why do we need to use a third party script to be the middle man for the middle man?
It just adds clutter to the filesystem, and more code to break. There is really no need for it. It can just as easily be done with home grown templates and crafty functions.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.