I can see your point and have used this technique in very small applications where the benefit of Smarty or other template engines are negated by the performance/resource usage overhead.
However intermixing markup and PHP has introduced many problems in too many PHP projects for me to use this technique in very many applications I have to support. Additionally the usage of <?= is considered bad form in most cases and <? can break other file formats like XML. This is an excellent alternative to a full fledge template engine where you are primarily looking for variable substitution and not the power of a more feature rich solution. Like other solutions maintainability and scalability should be considered, the IRS is still operating on code written in 1962, probably far longer than the original authors ever anticipated and shows it might even be possible for a programmer's code to outlive them. Jason -----Original Message----- From: Justin French [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 07, 2004 6:26 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [PHP] smarty On 07/04/2004, at 1:33 AM, Angelo Zanetti wrote: > hi all has anyone used smarty before? what do you think of it? I think > it's pretty nice to seperate your script (code) from your design. > > i would like to hear your comments and if you have any alternatives > let me know. PHP itself is a great templating language :) <h1><?=$title?></h1> <table> <? foreach($staff as $person): ?> <tr > <td><?=$person['firstname']?> <?=$person['surname']?></td> <td><?=$person['role']?></td> <td><?=$person['phone']?></td> <td><a href='mailto:<?=$person['email']?>'><?=$person['email']?></td> </tr> <? endforeach; ?> </table> You can still separate your logic from your presentation, template designers can still use quick, simple "tags" to include code, and the upside is that people familiar with PHP don't need to learn ANOTHER language (that's what Smarty is) -- they can dive straight in. The question is, do you want to give your templater designers full access to the power of PHP, or not. In my case, I did. Justin --- Justin French http://indent.com.au -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php