News Feed
Jobs Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Ivo Jansch's Blog:
PHP as a template language
February 15, 2010 @ 08:12:04

Ivo Jansch has a recent post to his blog talking about one of the great debates in the world of PHP - is the language by itself a good templating language (versus using something like Smarty)?

I think I've said it before. The tool you use should depend on the job you're trying to do. So to say that Smarty is wrong just because it is, does not feel right. I agree that in many cases PHP can be used as a template language just fine, but there are situations where a Smarty template (or any other templating engine) is just that more pleasant.

He's comparing them on aesthetics alone, showing two snippets of code - one templated via PHP and the other in the format that Smarty uses to generate a simple chunk of XML. For more examples of the Smarty format, check out their documentation.

0 comments voice your opinion now!
template language opinion smarty


blog comments powered by Disqus

Similar Posts

Volker Dusch's Blog: Mandatory "Template Engines (Twig) vs Plain Old PHP" Post

PHPClasses.org: Lately in PHP, Episode 28 - PHP 5.5 Release Date and Plans

ServerGrove Blog: Editing Twig Templates in Dreamweaver

Cal Evans' Blog: 5 PHP twitter accounts that have replaced my feed reader

Justin Silverton\'s Blog: How to Cache Smarty Templates (as per the manual)


Community Events











Don't see your event here?
Let us know!


application podcast opinion security support release hhvm symfony2 code install introduction facebook framework composer hack language unittest component overview package

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework