<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: CakePHP Weekly Summaries Issue #2</title>
	<atom:link href="http://www.cakephp.nu/cakephp-weekly-summaries-issue-2/feed" rel="self" type="application/rss+xml" />
	<link>http://www.cakephp.nu/cakephp-weekly-summaries-issue-2</link>
	<description>Cake and cookies by Jippi</description>
	<lastBuildDate>Fri, 06 Nov 2009 19:47:42 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Logan - Arbeitsrecht Rechtsanwalt Stuttgart</title>
		<link>http://www.cakephp.nu/cakephp-weekly-summaries-issue-2/comment-page-1#comment-3894</link>
		<dc:creator>Logan - Arbeitsrecht Rechtsanwalt Stuttgart</dc:creator>
		<pubDate>Thu, 15 Jan 2009 12:38:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.cakephp.nu/cakephp-weekly-summaries-issue-2#comment-3894</guid>
		<description>WOW! nice tutorial! that&#039;s what I exactly need. You are explaining in such a simple and straightforward! why others can&#039;t do it as you&#039;ve done? may be it&#039;s a talent... thanx a lot!</description>
		<content:encoded><![CDATA[<p>WOW! nice tutorial! that&#8217;s what I exactly need. You are explaining in such a simple and straightforward! why others can&#8217;t do it as you&#8217;ve done? may be it&#8217;s a talent&#8230; thanx a lot!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nate Klaiber</title>
		<link>http://www.cakephp.nu/cakephp-weekly-summaries-issue-2/comment-page-1#comment-2511</link>
		<dc:creator>Nate Klaiber</dc:creator>
		<pubDate>Fri, 07 Nov 2008 16:27:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.cakephp.nu/cakephp-weekly-summaries-issue-2#comment-2511</guid>
		<description>I recently picked up a PHP project and decided to use CakePHP for it. I had used Cake before I moved to RoR. I must say the process of getting back into CakePHP was a painful one. 

I can&#039;t buy into the idea of returning arrays over arrays of objects. There are instance methods that are useful in any view - it&#039;s not just about manipulating business logic. Nothing has to be manipulated in the view (that would be bad design). I often have counter cache methods, query methods, and other methods that BELONG in the model - not an external helper. They belong in the model because they are business logic, they are used in every other part of the application, and are used in formatting based on request (XML/JSON/HTML/etc). Having &#039;helpers&#039; to do this is extremely limiting to actually accessing your data (not to mention extremely verbose).

For instance. I have a User. A user has one profile, and has many notes associated with it. On a display page, I would want to 1) check if they had any notes, 2) find out how many notes they have, 3) iterate over those notes and have the info attached to them. That first check, to see if they have any notes, could require business logic to decide which notes need to be displayed. Simply &#039;creating more associations&#039; is a very poor way to go about this. My method, lets say $user-&gt;notes_count() is not something that is manipulated in the view, but is used to give me accurate results based on the relationship of the models (business logic).

Iterating over an array, and then using external helper methods to do this - is just a poor design (in my opinion). It should all be encapsulated in the model. The filters in the model should still be there - but I would disagree on some of their usages.</description>
		<content:encoded><![CDATA[<p>I recently picked up a PHP project and decided to use CakePHP for it. I had used Cake before I moved to RoR. I must say the process of getting back into CakePHP was a painful one. </p>
<p>I can&#8217;t buy into the idea of returning arrays over arrays of objects. There are instance methods that are useful in any view &#8211; it&#8217;s not just about manipulating business logic. Nothing has to be manipulated in the view (that would be bad design). I often have counter cache methods, query methods, and other methods that BELONG in the model &#8211; not an external helper. They belong in the model because they are business logic, they are used in every other part of the application, and are used in formatting based on request (XML/JSON/HTML/etc). Having &#8216;helpers&#8217; to do this is extremely limiting to actually accessing your data (not to mention extremely verbose).</p>
<p>For instance. I have a User. A user has one profile, and has many notes associated with it. On a display page, I would want to 1) check if they had any notes, 2) find out how many notes they have, 3) iterate over those notes and have the info attached to them. That first check, to see if they have any notes, could require business logic to decide which notes need to be displayed. Simply &#8216;creating more associations&#8217; is a very poor way to go about this. My method, lets say $user-&gt;notes_count() is not something that is manipulated in the view, but is used to give me accurate results based on the relationship of the models (business logic).</p>
<p>Iterating over an array, and then using external helper methods to do this &#8211; is just a poor design (in my opinion). It should all be encapsulated in the model. The filters in the model should still be there &#8211; but I would disagree on some of their usages.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Terr</title>
		<link>http://www.cakephp.nu/cakephp-weekly-summaries-issue-2/comment-page-1#comment-65</link>
		<dc:creator>Terr</dc:creator>
		<pubDate>Tue, 04 Mar 2008 10:41:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.cakephp.nu/cakephp-weekly-summaries-issue-2#comment-65</guid>
		<description>Great overview, just like the first summary. Don&#039;t feel too embarrased, you&#039;re doing this as a courtesy in your free time :)</description>
		<content:encoded><![CDATA[<p>Great overview, just like the first summary. Don&#8217;t feel too embarrased, you&#8217;re doing this as a courtesy in your free time <img src='http://www.cakephp.nu/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>
