News Feed
Sections




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

Sean Coates' Blog:
PHP as a templating language
May 15, 2012 @ 10:58:37

In this new post to his blog Sean Coates talks about PHP as a templating language and why he (and Gimmebar) have decided to go another, more frontend-based direction.

For many years, I was a supporter of using PHP as a templating language to render HTML. However, I really don't buy into the idea of adding an additional abstraction layer on top of PHP, such as Smarty (and many others). In the past year or so, I've come to the realization that even PHP itself is no longer ideally suited to function as the templating engine of current web applications - at least not as the primary templating engine for such apps.

His reasoning is pretty simple - more and more web applications are becoming less and less server-driven. When building applications (and APIs) you don't know how the data will be consumed, so your frontend has to be agnostic. So, what's his current alternative of choice? The Mustache templating framework provides a simple way to create reusable templates (along with the compatible Handlebars Javascript library).

0 comments voice your opinion now!
templating language smarty mustache handlebars javascript api


blog comments powered by Disqus

Similar Posts

Felix Geisendorfer's Blog: Basic CakePHP templating skills

Jonathan Street's Blog: PHP5 Compete API Wrapper

Anthony Ferrara's Blog: PHP's Source Code For PHP Developers - Part 1 - The Structure

Ilia Alshanetsky's Blog: Filter Extension Revamped (and PHP 5.2 news)

Application Development Trends: New LAMP Layer: FileMaker API for PHP?


Community Events





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


interview library symfony framework install package community voicesoftheelephpant api tips laravel podcast list series opinion release introduction bugfix language deployment

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