<?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 05:01:50 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Jani Hartikainen's Blog: Reusable "generic" actions in Zend Framework]]></title>
      <guid>http://www.phpdeveloper.org/news/11629</guid>
      <link>http://www.phpdeveloper.org/news/11629</link>
      <description><![CDATA[<p>
In <a href="http://codeutopia.net/blog/2008/12/27/reusable-generic-actions-in-zend-framework/">this recent blog entry</a> <i>Jani Hartikainen</i> looks at the creation of generic actions for Zend Framework applications - methods that can be used to help eliminate code duplication:
</p>
<blockquote>
Sometimes you will need nearly the same functionality in many actions. [...] There are several ways to deal with this, such as moving the code into a separate function, or an action helper. But in this post, I'm going to introduce so called "generic actions" - parametrized, easy to reuse actions - which is an idea similar to <a href="http://docs.djangoproject.com/en/dev/ref/generic-views/">django generic views</a>.
</blockquote>
<p>
His example takes a generic action - one that grabs and output records from a table - and modifies it to take in parameters from the defining function as to which action/controller/model and ID to use. Then this action can be used over and over in multiple places without having to do any copy and paste coding. 
</p>]]></description>
      <pubDate>Mon, 29 Dec 2008 07:55:13 -0600</pubDate>
    </item>
  </channel>
</rss>
