<?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>Wed, 22 May 2013 08:52:21 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Michael Kimsal's Blog: ActiveFormat idea for templating?]]></title>
      <guid>http://www.phpdeveloper.org/news/7763</guid>
      <link>http://www.phpdeveloper.org/news/7763</link>
      <description><![CDATA[<p>
There's an interesting post from <i>Michael Kimsal</i> over on his blog concerning an email he received from a developer over at <a href="http://biz.metrofindings.com/">metrofindings.com</a> asking about the possible creation of something he called (tentatively) "Active Printers" (or "Active Formatter").
</p>
<blockquote>
Just now I was looking at some crappy OSCommerce code, and deciding how to rip it up into a template system.  And I'm talking with kyle, and the proverbial question comes up, do you give your template system objects, or strings. What if you gave it special "active record"-esque template objects.  Active Printers... or something.  Then you could work with everything in a consistent interface, escaping all content with htmlspecialchars if needed, etc etc.  Looping through object data and making a table...
</blockquote>
<p>
The email included a block of concept code of how he pictured it working - a pretty simple system really. Pushing data into the class and showing what tag(s) to style it with and have it "know" how to format it (like a phone number string). <i>Michael</i> <a href="http://fosterburgess.com/kimsal/?p=237">asks his readers</a> if they've seen something like this before.
</p>
<p>
<a href="http://fosterburgess.com/kimsal/?p=237#comments">Comments</a> already made include discussions of things like xmlWriter, presentation and business logic, and the <a href="http://phpsavant.com/">Savant</a> templating library.
</p>]]></description>
      <pubDate>Thu, 03 May 2007 08:41:00 -0500</pubDate>
    </item>
  </channel>
</rss>
