<?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 09:05:33 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Developer.com: Fat Models and Skinny Controllers Bring Out the Best in Your MVC Framework]]></title>
      <guid>http://www.phpdeveloper.org/news/13772</guid>
      <link>http://www.phpdeveloper.org/news/13772</link>
      <description><![CDATA[<p>
<a href="http://www.developer.com/design/article.php/3856246/article.htm">This new article</a> on Developer.com advocates one way of working with the MVC pattern in your framework-based applications - fat models and skinny controllers.
</p>
<blockquote>
But a framework shouldn't be considered a panacea; it remains paramount for you to continue exploring and implementing best practices, which will further enhance the maintainability, reusability, and readability of your code. One such best practice involves adhering to a design decision that produces "fat models" and "skinny controllers." The term "fat" is derived from the idea of packing as much of the data-related logic into the model as possible while maintaining a streamlined, almost barren controller.
</blockquote>
<p>
The concept applies to several web application frameworks out there, but they use the <a href="http://framework.zend.com">Zend Framework</a> to talk about the wrong way - putting most of the application logic in the controllers - and what they think is a more flexible, organized way to handle the code. A bit of code is included to help illustrate their point.
</p>]]></description>
      <pubDate>Mon, 04 Jan 2010 12:09:20 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Chris Hartjes' Blog: Converting Legacy Apps to CakePHP, Part 3]]></title>
      <guid>http://www.phpdeveloper.org/news/11653</guid>
      <link>http://www.phpdeveloper.org/news/11653</link>
      <description><![CDATA[<p>
<i>Chris Hartjes</i> continues his series looking at converting over legacy applications into a CakePHP environment with <a href="http://www.littlehart.net/atthekeyboard/2008/12/30/converting-legacy-apps-to-cakephp-part-3/">this third part</a>, a focus on what can be one of the hardest parts - separating out business logic and presentation logic.
</p>
<blockquote>
Anyway, onto other matters. As you saw in parts 1 and 2, a bug part in having a successful transition from legacy app to CakePHP is having an environment that is well suited to the use of a framework. Having laid out the groundwork for that switchover, it's time to talk about the part of a refactoring or porting that is most difficult: separating your business logic from your display logic. 
</blockquote>
<p>
He talks about fat models, skinny controllers and flexible views with some code to illustrate each. This method makes the models do most of the work while the controllers are more of a go-between for them and the views. The views, then, are pliable enough to work with whatever data might be thrown at them.
</p>]]></description>
      <pubDate>Wed, 31 Dec 2008 12:58:33 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Chris Hartjes' Blog: Fat Models, Skinny Controllers]]></title>
      <guid>http://www.phpdeveloper.org/news/7728</guid>
      <link>http://www.phpdeveloper.org/news/7728</link>
      <description><![CDATA[<p>
In a <a href="http://www.littlehart.net/atthekeyboard/2007/04/27/fat-models-skinny-controllers/"new blog post</a> today, <i>Chris Hartjes</i> talks about fat models and skinny controllers:
</p>
<blockquote>
What does this really mean? It means that you put as much of your business logic as you can into your models and all the controller should be doing is retrieving data from the model and passing it to the view. Nice and simple, but a very powerful concept once you start doing it.
</blockquote>
<p>
He includes an example of this school of thought - <a href="http://www.littlehart.net/atthekeyboard/2007/04/27/fat-models-skinny-controllers/">an update</a> to a <a href="http://www.ibl.org/">previous project</a> that shows most of the functionality and logic (schedule information being pulled in and parsed) and the controller that, lightly, grabs this information from the controller and, blissfully ignorant, passes it right along to the view to be displayed.
</p>]]></description>
      <pubDate>Mon, 30 Apr 2007 07:49:00 -0500</pubDate>
    </item>
  </channel>
</rss>
