<?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: Don&#8217;t implement a known concept differently</title>
	<atom:link href="http://cakebaker.42dh.com/2007/09/20/dont-implement-a-known-concept-differently/feed/" rel="self" type="application/rss+xml" />
	<link>http://cakebaker.42dh.com/2007/09/20/dont-implement-a-known-concept-differently/</link>
	<description>baking cakes with CakePHP</description>
	<lastBuildDate>Tue, 31 Jan 2012 15:12:14 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: cakebaker</title>
		<link>http://cakebaker.42dh.com/2007/09/20/dont-implement-a-known-concept-differently/comment-page-1/#comment-49026</link>
		<dc:creator>cakebaker</dc:creator>
		<pubDate>Thu, 27 Dec 2007 16:49:12 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/2007/09/20/dont-implement-a-known-concept-differently/#comment-49026</guid>
		<description>@Tim: I think it is rarely used outside of the core. But that doesn&#039;t mean it couldn&#039;t be useful for application specific stuff. You simply have to be aware of the behavior I described in the article.</description>
		<content:encoded><![CDATA[<p>@Tim: I think it is rarely used outside of the core. But that doesn&#8217;t mean it couldn&#8217;t be useful for application specific stuff. You simply have to be aware of the behavior I described in the article.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tim Daldini</title>
		<link>http://cakebaker.42dh.com/2007/09/20/dont-implement-a-known-concept-differently/comment-page-1/#comment-48797</link>
		<dc:creator>Tim Daldini</dc:creator>
		<pubDate>Wed, 26 Dec 2007 23:25:52 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/2007/09/20/dont-implement-a-known-concept-differently/#comment-48797</guid>
		<description>So the ClassRegistery is a place to store singletons which for example contains the current View.

Now I&#039;m just wondering, what else could or should be stored there? (examples?) Does it also serve as a place to store your own (application specific) singleton instances?</description>
		<content:encoded><![CDATA[<p>So the ClassRegistery is a place to store singletons which for example contains the current View.</p>
<p>Now I&#8217;m just wondering, what else could or should be stored there? (examples?) Does it also serve as a place to store your own (application specific) singleton instances?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cakebaker</title>
		<link>http://cakebaker.42dh.com/2007/09/20/dont-implement-a-known-concept-differently/comment-page-1/#comment-16785</link>
		<dc:creator>cakebaker</dc:creator>
		<pubDate>Tue, 02 Oct 2007 09:33:31 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/2007/09/20/dont-implement-a-known-concept-differently/#comment-16785</guid>
		<description>@The Mullet: Well, ticket https://trac.cakephp.org/ticket/3333 is a different issue. Sure, it is also about the semantic of code, but not related to this post. And yes, for me it is a bug if code has side-effects you don&#039;t expect, even though not everyone may agree. The ticket for the issue described in this post is https://trac.cakephp.org/ticket/3241, and I opened it _before_ I wrote this post.

And before you try to imply I intend to obstruct the development of CakePHP, I recommend you have a look at https://trac.cakephp.org/query?status=new&amp;status=assigned&amp;status=reopened&amp;status=closed&amp;reporter=dho&amp;order=priority</description>
		<content:encoded><![CDATA[<p>@The Mullet: Well, ticket <a href="https://trac.cakephp.org/ticket/3333" rel="nofollow">https://trac.cakephp.org/ticket/3333</a> is a different issue. Sure, it is also about the semantic of code, but not related to this post. And yes, for me it is a bug if code has side-effects you don&#8217;t expect, even though not everyone may agree. The ticket for the issue described in this post is <a href="https://trac.cakephp.org/ticket/3241" rel="nofollow">https://trac.cakephp.org/ticket/3241</a>, and I opened it _before_ I wrote this post.</p>
<p>And before you try to imply I intend to obstruct the development of CakePHP, I recommend you have a look at <a href="https://trac.cakephp.org/query?status=new&#038;status=assigned&#038;status=reopened&#038;status=closed&#038;reporter=dho&#038;order=priority" rel="nofollow">https://trac.cakephp.org/query?status=new&#038;status=assigned&#038;status=reopened&#038;status=closed&#038;reporter=dho&#038;order=priority</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: The Mullet</title>
		<link>http://cakebaker.42dh.com/2007/09/20/dont-implement-a-known-concept-differently/comment-page-1/#comment-16777</link>
		<dc:creator>The Mullet</dc:creator>
		<pubDate>Tue, 02 Oct 2007 08:25:32 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/2007/09/20/dont-implement-a-known-concept-differently/#comment-16777</guid>
		<description>Gosh, can you believe this: even after discussing this topic, dho still is not satisfied, and wastes peoples time by posting this topic in the bugtracker at the cakeforge (#3333). What did you expect, Daniel? 
Nate  and others have explained this to you, so if you don&#039;t understand the reasons, keep quiet. But there&#039;s no case in putting this to the buglist, especially two weeks later, and also since this is not a bug. 

Once again: if all you intend is to obstruct further development, move on to rails.</description>
		<content:encoded><![CDATA[<p>Gosh, can you believe this: even after discussing this topic, dho still is not satisfied, and wastes peoples time by posting this topic in the bugtracker at the cakeforge (#3333). What did you expect, Daniel?<br />
Nate  and others have explained this to you, so if you don&#8217;t understand the reasons, keep quiet. But there&#8217;s no case in putting this to the buglist, especially two weeks later, and also since this is not a bug. </p>
<p>Once again: if all you intend is to obstruct further development, move on to rails.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cakebaker</title>
		<link>http://cakebaker.42dh.com/2007/09/20/dont-implement-a-known-concept-differently/comment-page-1/#comment-15327</link>
		<dc:creator>cakebaker</dc:creator>
		<pubDate>Tue, 25 Sep 2007 17:23:00 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/2007/09/20/dont-implement-a-known-concept-differently/#comment-15327</guid>
		<description>@all: Thanks for your comments!

@Tarique: It&#039;s OT, but I think if you have to singletonise non-singleton classes then something is wrong in your design ;-)

@the_james: Thanks for the explanation, you did it better than I did ;-)

@Repsah: Hm, the title and the last sentence are not thought as an attack, to me they are simply the main message of the article (and not specifically directed at the CakePHP project). 

And yes, nate&#039;s change is a move in the right direction, but as you say, something more visible would be helpful.</description>
		<content:encoded><![CDATA[<p>@all: Thanks for your comments!</p>
<p>@Tarique: It&#8217;s OT, but I think if you have to singletonise non-singleton classes then something is wrong in your design ;-)</p>
<p>@the_james: Thanks for the explanation, you did it better than I did ;-)</p>
<p>@Repsah: Hm, the title and the last sentence are not thought as an attack, to me they are simply the main message of the article (and not specifically directed at the CakePHP project). </p>
<p>And yes, nate&#8217;s change is a move in the right direction, but as you say, something more visible would be helpful.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Repsah</title>
		<link>http://cakebaker.42dh.com/2007/09/20/dont-implement-a-known-concept-differently/comment-page-1/#comment-14839</link>
		<dc:creator>Repsah</dc:creator>
		<pubDate>Sun, 23 Sep 2007 15:44:27 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/2007/09/20/dont-implement-a-known-concept-differently/#comment-14839</guid>
		<description>@all: I have the impression that you all are right and simply failing to understand each others...

@cakebaker: the article is very useful, but contains two big mistakes: the title and the last sentence, reading that from a developer point of view generates irritation, I think it falls nicely in your &quot;How to defend yourself in a discussion&quot; article, you&#039;re attacking first in order to prevent attacks, in this case, it&#039;s not working.

@nate, Tarique: Daniel is not wrong when he says that people expect a collection of data to behave like other data collections, if the intended behavior is different then it should be pointed out and throw a warning or error when used in a not intended manner. A simple web developer doesn&#039;t want to know how the class registry works, just wants to use it, if he uses in the wrong way, you have to tell them somehow.

@cakebaker again: I think you should appreciate the change nate implemented as it is in your thought direction, maybe you could simply add that something more visible (warning, error) would help the user understand what is going on.

@all: keep up the good work.</description>
		<content:encoded><![CDATA[<p>@all: I have the impression that you all are right and simply failing to understand each others&#8230;</p>
<p>@cakebaker: the article is very useful, but contains two big mistakes: the title and the last sentence, reading that from a developer point of view generates irritation, I think it falls nicely in your &#8220;How to defend yourself in a discussion&#8221; article, you&#8217;re attacking first in order to prevent attacks, in this case, it&#8217;s not working.</p>
<p>@nate, Tarique: Daniel is not wrong when he says that people expect a collection of data to behave like other data collections, if the intended behavior is different then it should be pointed out and throw a warning or error when used in a not intended manner. A simple web developer doesn&#8217;t want to know how the class registry works, just wants to use it, if he uses in the wrong way, you have to tell them somehow.</p>
<p>@cakebaker again: I think you should appreciate the change nate implemented as it is in your thought direction, maybe you could simply add that something more visible (warning, error) would help the user understand what is going on.</p>
<p>@all: keep up the good work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: the_james</title>
		<link>http://cakebaker.42dh.com/2007/09/20/dont-implement-a-known-concept-differently/comment-page-1/#comment-14690</link>
		<dc:creator>the_james</dc:creator>
		<pubDate>Sun, 23 Sep 2007 01:19:49 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/2007/09/20/dont-implement-a-known-concept-differently/#comment-14690</guid>
		<description>I can totally see cakebakers point here:  Its not the fact that the function is a singleton, or that he is using it wrong.  Its the fact that it fails silently.   Additionally, in all languages with a structure / collection with a key-&gt;value pair, writing a new value to an existing key will overwrite the existing value.  The context is irrelevant.

So again, the problem here is semantics and not context.   Ideally, the function should throw some sort of error when an attempt to overwrite the value is made (because evidently its not supposed to be used that way).   You should not have to have intimate knowledge of the cake core to use this function.   It should either work like you  think it should (ie operate by normal semantics), or tell you differently at runtime (by returning an error or throwing an exception).  It should NOT fail silently.</description>
		<content:encoded><![CDATA[<p>I can totally see cakebakers point here:  Its not the fact that the function is a singleton, or that he is using it wrong.  Its the fact that it fails silently.   Additionally, in all languages with a structure / collection with a key-&gt;value pair, writing a new value to an existing key will overwrite the existing value.  The context is irrelevant.</p>
<p>So again, the problem here is semantics and not context.   Ideally, the function should throw some sort of error when an attempt to overwrite the value is made (because evidently its not supposed to be used that way).   You should not have to have intimate knowledge of the cake core to use this function.   It should either work like you  think it should (ie operate by normal semantics), or tell you differently at runtime (by returning an error or throwing an exception).  It should NOT fail silently.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tarique Sani</title>
		<link>http://cakebaker.42dh.com/2007/09/20/dont-implement-a-known-concept-differently/comment-page-1/#comment-14292</link>
		<dc:creator>Tarique Sani</dc:creator>
		<pubDate>Fri, 21 Sep 2007 09:49:30 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/2007/09/20/dont-implement-a-known-concept-differently/#comment-14292</guid>
		<description>ClassRegistry to me looks like a way to Singletonise my classes and I does so correctly.  If it allowed my singletons to be overwritten so easily I would be irritated....

If ClassRegistry was just a way to store key/value pairs I would say what a waste - why not use associative arrays instead :D</description>
		<content:encoded><![CDATA[<p>ClassRegistry to me looks like a way to Singletonise my classes and I does so correctly.  If it allowed my singletons to be overwritten so easily I would be irritated&#8230;.</p>
<p>If ClassRegistry was just a way to store key/value pairs I would say what a waste &#8211; why not use associative arrays instead :D</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cakebaker</title>
		<link>http://cakebaker.42dh.com/2007/09/20/dont-implement-a-known-concept-differently/comment-page-1/#comment-14291</link>
		<dc:creator>cakebaker</dc:creator>
		<pubDate>Fri, 21 Sep 2007 09:33:17 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/2007/09/20/dont-implement-a-known-concept-differently/#comment-14291</guid>
		<description>@nate, Tarique: Thanks for your comments! I have the feeling you don&#039;t get what I try to show :&#124;

Let me give you an example from the field of usability: If you see a &quot;button&quot;, you expect it behaves like a button, i.e. that you can press it and something happens. If you can&#039;t press it, as it is only thought as decoration, well, then you are irritated. 

The same applies for software, and that&#039;s what I tried to show with my example. You see a class that looks like a container for key/value pairs and so you expect it behaves in a certain way. In this case, that existing stuff in the registry gets overwritten when adding an object with the same key. If that doesn&#039;t happen, well, then you are irritated.  So you can also see it as a usability issue ;-)</description>
		<content:encoded><![CDATA[<p>@nate, Tarique: Thanks for your comments! I have the feeling you don&#8217;t get what I try to show :|</p>
<p>Let me give you an example from the field of usability: If you see a &#8220;button&#8221;, you expect it behaves like a button, i.e. that you can press it and something happens. If you can&#8217;t press it, as it is only thought as decoration, well, then you are irritated. </p>
<p>The same applies for software, and that&#8217;s what I tried to show with my example. You see a class that looks like a container for key/value pairs and so you expect it behaves in a certain way. In this case, that existing stuff in the registry gets overwritten when adding an object with the same key. If that doesn&#8217;t happen, well, then you are irritated.  So you can also see it as a usability issue ;-)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tarique Sani</title>
		<link>http://cakebaker.42dh.com/2007/09/20/dont-implement-a-known-concept-differently/comment-page-1/#comment-14278</link>
		<dc:creator>Tarique Sani</dc:creator>
		<pubDate>Fri, 21 Sep 2007 07:24:11 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/2007/09/20/dont-implement-a-known-concept-differently/#comment-14278</guid>
		<description>@Daniel - I find myself agreeing with Nate and Mariano here. Nate has very correctly pointed out a Singleton is a Singleton is a Singleton! You still appear to be grinding an axe - forget it man and move ahead 

@Nate - returning just true or false just increases the amount of code which the app programmer has to write - trigger_error(&quot;You dolt! Singletons serve a purpose&quot;, E_USER_WARNING ) would be more apt ;)</description>
		<content:encoded><![CDATA[<p>@Daniel &#8211; I find myself agreeing with Nate and Mariano here. Nate has very correctly pointed out a Singleton is a Singleton is a Singleton! You still appear to be grinding an axe &#8211; forget it man and move ahead </p>
<p>@Nate &#8211; returning just true or false just increases the amount of code which the app programmer has to write &#8211; trigger_error(&#8220;You dolt! Singletons serve a purpose&#8221;, E_USER_WARNING ) would be more apt ;)</p>
]]></content:encoded>
	</item>
</channel>
</rss>

