<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Tue, 21 May 2013 22:13:25 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Anthony Ferrara: On Templating]]></title>
      <guid>http://www.phpdeveloper.org/news/18874</guid>
      <link>http://www.phpdeveloper.org/news/18874</link>
      <description><![CDATA[<p>
In <a href="http://blog.ircmaxell.com/2012/12/on-templating.html">this latest post</a> to his site <i>Anthony Ferrara</i> take a look at templating in web applications - more specifically as it deals with his experience with the <a href="http://mustache.github.com/">Mustache</a> templating engine.
</p>
<blockquote>
I've been playing around with tempting engines a lot lately. For a recent project, I needed the ability to re-use the same template set in both JS and PHP (coupled with the History API, providing seamless dynamic behavior, yet still having raw content pages). Realistically today, there's only one choice for that sort of requirement: <a href="http://mustache.github.com/">Mustache</a>. I've learned a lot while playing with Mustache, and it's really changed my entire viewpoint on presentation layer construction.
</blockquote>
<p>
He briefly gives an overview of "the past" of templating in PHP (including a mention of <a href="http://www.smarty.net/">Smarty</a>) and how templating tools - like <a href="http://mustache.github.com/">Mustache</a> - have helped to improve the situation, especially when it comes to the separation of presentation and processing. As an alternative, there's also a mention of the <a href="http://twig.sensiolabs.org/">Twig</a> templating engine in the comments, another popular option from the Symfony project.
</p>]]></description>
      <pubDate>Tue, 11 Dec 2012 11:50:31 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Sean Coates' Blog: PHP as a templating language]]></title>
      <guid>http://www.phpdeveloper.org/news/17960</guid>
      <link>http://www.phpdeveloper.org/news/17960</link>
      <description><![CDATA[<p>
In <a href="http://seancoates.com/blogs/php-as-a-templating-language">this new post</a> to his blog <i>Sean Coates</i> talks about PHP as a templating language and why he (and <a href="http://gimmebar.com">Gimmebar</a>) have decided to go another, more frontend-based direction.
</p>
<blockquote>
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 <a href="http://smarty.php.net/">Smarty</a> (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.
</blockquote>
<p>
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 <a href="http://mustache.github.com/">Mustache</a> templating framework provides a simple way to create reusable templates (along with the compatible <a href="http://handlebarsjs.com/">Handlebars</a> Javascript library).
</p>]]></description>
      <pubDate>Tue, 15 May 2012 10:58:37 -0500</pubDate>
    </item>
  </channel>
</rss>
