<?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: Three new validation rules</title>
	<atom:link href="http://cakebaker.42dh.com/2008/05/21/three-new-validation-rules/feed/" rel="self" type="application/rss+xml" />
	<link>http://cakebaker.42dh.com/2008/05/21/three-new-validation-rules/</link>
	<description>baking cakes with CakePHP</description>
	<lastBuildDate>Mon, 15 Mar 2010 20:27:55 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: cakebaker</title>
		<link>http://cakebaker.42dh.com/2008/05/21/three-new-validation-rules/comment-page-1/#comment-99584</link>
		<dc:creator>cakebaker</dc:creator>
		<pubDate>Mon, 21 Jul 2008 17:16:10 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/?p=605#comment-99584</guid>
		<description>@Rafael: Ah, yes, that&#039;s the convention used for the FormHelper &amp; Co. I see why this convention is used, but personally I almost never use it in my own code. For me, methods do something, and so the names have to contain a verb to describe what they do.</description>
		<content:encoded><![CDATA[<p>@Rafael: Ah, yes, that&#8217;s the convention used for the FormHelper &#038; Co. I see why this convention is used, but personally I almost never use it in my own code. For me, methods do something, and so the names have to contain a verb to describe what they do.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rafael Bandeira aka rafaelbandeira3</title>
		<link>http://cakebaker.42dh.com/2008/05/21/three-new-validation-rules/comment-page-1/#comment-98995</link>
		<dc:creator>Rafael Bandeira aka rafaelbandeira3</dc:creator>
		<pubDate>Fri, 18 Jul 2008 20:02:15 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/?p=605#comment-98995</guid>
		<description>Yeah you&#039;re right.

I follow one convention for view helper method names and it basically says that it should make sense in the rendering context, wich usually means that verbs are not good choices as the &quot;phrase&quot; is always suffixed with echo or print.

oh yeah, I use FF...

no it doesn&#039;t mean it!
it means that i got you on my google reader, with many stars, on my delicious, in a special cakephp/programming bundle, and that I often &quot;crawl&quot; around your codes, tips and comments, cuz it&#039;s usually good stuff.</description>
		<content:encoded><![CDATA[<p>Yeah you&#8217;re right.</p>
<p>I follow one convention for view helper method names and it basically says that it should make sense in the rendering context, wich usually means that verbs are not good choices as the &#8220;phrase&#8221; is always suffixed with echo or print.</p>
<p>oh yeah, I use FF&#8230;</p>
<p>no it doesn&#8217;t mean it!<br />
it means that i got you on my google reader, with many stars, on my delicious, in a special cakephp/programming bundle, and that I often &#8220;crawl&#8221; around your codes, tips and comments, cuz it&#8217;s usually good stuff.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cakebaker</title>
		<link>http://cakebaker.42dh.com/2008/05/21/three-new-validation-rules/comment-page-1/#comment-98970</link>
		<dc:creator>cakebaker</dc:creator>
		<pubDate>Fri, 18 Jul 2008 16:57:27 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/?p=605#comment-98970</guid>
		<description>@Rafael: Thanks for your comment!

I have to admit I never saw it in this way: &quot;echo this element: login_form&quot;. But I think it contains a translation error: &quot;$this&quot; doesn&#039;t refer to the element but the view object ;-)  Anyway, you could also say &quot;echo element login_form&quot;. 

On the other hand you can read the code in the order it is processed: &quot;element login_form and echo it&quot; vs. &quot;render element login_form and echo it&quot;. 

Or you could argument that an element is a kind of view and the method name should be simply &quot;render&quot;. 

So, in the end it is probably a philosophical question which name is better. 

I&#039;m sorry the form was emptied. I&#039;m not sure what the cause is of that, as the form is only cleared with Firefox but not with Konqueror. It&#039;s something I have to investigate...

Oh, and you are the first who calls me one of his gurus, I hope that doesn&#039;t mean you don&#039;t question what I write ;-)</description>
		<content:encoded><![CDATA[<p>@Rafael: Thanks for your comment!</p>
<p>I have to admit I never saw it in this way: &#8220;echo this element: login_form&#8221;. But I think it contains a translation error: &#8220;$this&#8221; doesn&#8217;t refer to the element but the view object ;-)  Anyway, you could also say &#8220;echo element login_form&#8221;. </p>
<p>On the other hand you can read the code in the order it is processed: &#8220;element login_form and echo it&#8221; vs. &#8220;render element login_form and echo it&#8221;. </p>
<p>Or you could argument that an element is a kind of view and the method name should be simply &#8220;render&#8221;. </p>
<p>So, in the end it is probably a philosophical question which name is better. </p>
<p>I&#8217;m sorry the form was emptied. I&#8217;m not sure what the cause is of that, as the form is only cleared with Firefox but not with Konqueror. It&#8217;s something I have to investigate&#8230;</p>
<p>Oh, and you are the first who calls me one of his gurus, I hope that doesn&#8217;t mean you don&#8217;t question what I write ;-)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rafael Bandeira aka rafaelbandeira3</title>
		<link>http://cakebaker.42dh.com/2008/05/21/three-new-validation-rules/comment-page-1/#comment-98935</link>
		<dc:creator>Rafael Bandeira aka rafaelbandeira3</dc:creator>
		<pubDate>Fri, 18 Jul 2008 13:05:19 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/?p=605#comment-98935</guid>
		<description>I have to disagree with the View::renderElement thread...

first elements are intended to be part of the view context, so you are already rendering...
and on the semantic path we got the following:
echo $this-&gt;element(&#039;login_form&#039;);
wich one could translate:
echo this element : login_form

much better than the deprecated:
echo $this-&gt;renderElement(&#039;login_form&#039;);
echo this render element: login_form... wow its so prolix...

and it&#039;s shorter, wich is one of the most wanted view features: short lines...

btw, you are one of my gurus! lol
ps: when I first wrote, i mispelled my email and got a flash complaining the error, but no redirects, and when I came back, the form whas emptied... :( ... hate rewriting...

cheers!</description>
		<content:encoded><![CDATA[<p>I have to disagree with the View::renderElement thread&#8230;</p>
<p>first elements are intended to be part of the view context, so you are already rendering&#8230;<br />
and on the semantic path we got the following:<br />
echo $this-&gt;element(&#8216;login_form&#8217;);<br />
wich one could translate:<br />
echo this element : login_form</p>
<p>much better than the deprecated:<br />
echo $this-&gt;renderElement(&#8216;login_form&#8217;);<br />
echo this render element: login_form&#8230; wow its so prolix&#8230;</p>
<p>and it&#8217;s shorter, wich is one of the most wanted view features: short lines&#8230;</p>
<p>btw, you are one of my gurus! lol<br />
ps: when I first wrote, i mispelled my email and got a flash complaining the error, but no redirects, and when I came back, the form whas emptied&#8230; :( &#8230; hate rewriting&#8230;</p>
<p>cheers!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pages tagged "bret"</title>
		<link>http://cakebaker.42dh.com/2008/05/21/three-new-validation-rules/comment-page-1/#comment-91052</link>
		<dc:creator>Pages tagged "bret"</dc:creator>
		<pubDate>Sun, 25 May 2008 10:55:40 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/?p=605#comment-91052</guid>
		<description>[...] tagged bretOwn a Wordpress blog? Make monetization easier with the WP Affiliate Pro plugin. Three new validation rules&#160;saved by 1 others  &#160;&#160;&#160;&#160;GravitatingAngel bookmarked on 05/25/08 &#124; [...]</description>
		<content:encoded><![CDATA[<p>[...] tagged bretOwn a Wordpress blog? Make monetization easier with the WP Affiliate Pro plugin. Three new validation rules&nbsp;saved by 1 others  &nbsp;&nbsp;&nbsp;&nbsp;GravitatingAngel bookmarked on 05/25/08 | [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cakebaker</title>
		<link>http://cakebaker.42dh.com/2008/05/21/three-new-validation-rules/comment-page-1/#comment-90930</link>
		<dc:creator>cakebaker</dc:creator>
		<pubDate>Sat, 24 May 2008 15:18:22 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/?p=605#comment-90930</guid>
		<description>@Bret: Thanks for your comment!

The naming of methods is not really consistent in cake, many methods follow the verb convention, others, like most methods of the FormHelper, ignore it. I think that&#039;s the result of not having an explicit naming convention for method names (there is only the convention of having camel-cased method names).</description>
		<content:encoded><![CDATA[<p>@Bret: Thanks for your comment!</p>
<p>The naming of methods is not really consistent in cake, many methods follow the verb convention, others, like most methods of the FormHelper, ignore it. I think that&#8217;s the result of not having an explicit naming convention for method names (there is only the convention of having camel-cased method names).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bret Kuhns</title>
		<link>http://cakebaker.42dh.com/2008/05/21/three-new-validation-rules/comment-page-1/#comment-90745</link>
		<dc:creator>Bret Kuhns</dc:creator>
		<pubDate>Fri, 23 May 2008 16:20:22 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/?p=605#comment-90745</guid>
		<description>It&#039;s certainly silly to deprecate renderElement. I also agree that methods are considered the &quot;actions/behaviors&quot; of an object and should appropriately contain action verbs. This isn&#039;t always appropriate, but especially in the case of View::element(), it just makes good sense to specify the method /renders/ the element. Perhaps someone new to cakePHP could assume the method simply returns an instance of an Element object. Without consulting the docs, it&#039;s hard to tell, whereas renderElement() made it clear. Internal documentation via API! 

However, I guess as Mark points out, cakePHP doesn&#039;t really follow the verb convention often anyhow. This may very well make cakePHP more consistent with itself, but not quite what I would&#039;ve had in mind ;)</description>
		<content:encoded><![CDATA[<p>It&#8217;s certainly silly to deprecate renderElement. I also agree that methods are considered the &#8220;actions/behaviors&#8221; of an object and should appropriately contain action verbs. This isn&#8217;t always appropriate, but especially in the case of View::element(), it just makes good sense to specify the method /renders/ the element. Perhaps someone new to cakePHP could assume the method simply returns an instance of an Element object. Without consulting the docs, it&#8217;s hard to tell, whereas renderElement() made it clear. Internal documentation via API! </p>
<p>However, I guess as Mark points out, cakePHP doesn&#8217;t really follow the verb convention often anyhow. This may very well make cakePHP more consistent with itself, but not quite what I would&#8217;ve had in mind ;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: CakePHP1.2 で追加される3つのバリデーション &#124; Sun Limited Mt.</title>
		<link>http://cakebaker.42dh.com/2008/05/21/three-new-validation-rules/comment-page-1/#comment-90658</link>
		<dc:creator>CakePHP1.2 で追加される3つのバリデーション &#124; Sun Limited Mt.</dc:creator>
		<pubDate>Fri, 23 May 2008 07:03:16 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/?p=605#comment-90658</guid>
		<description>[...] 次に公開される CakePHP 1.2 に3つのバリデーションが追加されるようです。 Three new validation rules - cakebaker [...]</description>
		<content:encoded><![CDATA[<p>[...] 次に公開される CakePHP 1.2 に3つのバリデーションが追加されるようです。 Three new validation rules &#8211; cakebaker [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cakebaker</title>
		<link>http://cakebaker.42dh.com/2008/05/21/three-new-validation-rules/comment-page-1/#comment-90548</link>
		<dc:creator>cakebaker</dc:creator>
		<pubDate>Thu, 22 May 2008 15:19:32 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/?p=605#comment-90548</guid>
		<description>@all: Thanks for your comments!

@Juan: Thanks for the hint, it is now fixed in the article. 

@Steve: Yes, you remember correctly, View::element was originally a wrapper method for View::renderElement. 

@Mark: Personally I prefer method names to start with a verb because methods do something.</description>
		<content:encoded><![CDATA[<p>@all: Thanks for your comments!</p>
<p>@Juan: Thanks for the hint, it is now fixed in the article. </p>
<p>@Steve: Yes, you remember correctly, View::element was originally a wrapper method for View::renderElement. </p>
<p>@Mark: Personally I prefer method names to start with a verb because methods do something.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Story</title>
		<link>http://cakebaker.42dh.com/2008/05/21/three-new-validation-rules/comment-page-1/#comment-90460</link>
		<dc:creator>Mark Story</dc:creator>
		<pubDate>Thu, 22 May 2008 03:49:36 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/?p=605#comment-90460</guid>
		<description>element() did call renderElement.  As for preference of one over the other, element is shorter and fits a bit better with the other view /helper methods.  Just like it is no longer generateSelectDiv() just input().</description>
		<content:encoded><![CDATA[<p>element() did call renderElement.  As for preference of one over the other, element is shorter and fits a bit better with the other view /helper methods.  Just like it is no longer generateSelectDiv() just input().</p>
]]></content:encoded>
	</item>
</channel>
</rss>
