<?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 for Ralph Schindler</title>
	<atom:link href="http://ralphschindler.com/comments/feed" rel="self" type="application/rss+xml" />
	<link>http://ralphschindler.com</link>
	<description>Ralph Schindler</description>
	<lastBuildDate>Mon, 26 Mar 2012 03:30:11 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>Comment on Learning About Dependency Injection and PHP by sunshine1988</title>
		<link>http://ralphschindler.com/2011/05/18/learning-about-dependency-injection-and-php/comment-page-1#comment-67740</link>
		<dc:creator>sunshine1988</dc:creator>
		<pubDate>Mon, 26 Mar 2012 03:30:11 +0000</pubDate>
		<guid isPermaLink="false">http://ralphschindler.com/?p=144#comment-67740</guid>
		<description>To retrieve the auto complete of IDE when you get Obj from DIC, just add a &quot;@return ...&quot; comment.

/**
 * Get some obj
 * @return {the obj className or whatever it extends or implements}
 */
public function getSomeObj(){
    //do something
    return $someObj;
}
It works at least in ZendStudio and,I don&#039;t test any other IDEs!
PS: sorry for my poor English~</description>
		<content:encoded><![CDATA[<p>To retrieve the auto complete of IDE when you get Obj from DIC, just add a &#8220;@return &#8230;&#8221; comment.</p>
<p>/**<br />
 * Get some obj<br />
 * @return {the obj className or whatever it extends or implements}<br />
 */<br />
public function getSomeObj(){<br />
    //do something<br />
    return $someObj;<br />
}<br />
It works at least in ZendStudio and,I don&#8217;t test any other IDEs!<br />
PS: sorry for my poor English~</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on PHP Constructor Best Practices And The Prototype Pattern by Niko Kivelä</title>
		<link>http://ralphschindler.com/2012/03/09/php-constructor-best-practices-and-the-prototype-pattern/comment-page-1#comment-67208</link>
		<dc:creator>Niko Kivelä</dc:creator>
		<pubDate>Thu, 22 Mar 2012 07:23:10 +0000</pubDate>
		<guid isPermaLink="false">http://ralphschindler.com/?p=166#comment-67208</guid>
		<description>Against what @Ren said, I don&#039;t think that __clone method should be considered &quot;magic method&quot; (even tho it is) in a way as __call or __set magic methods but in a way as __construct or __destruct. There&#039;s a solid unambiguous point when objects __clone method is called, on keyword clone (compare to new keyword).

One point to notice, even tho you cannot overload clone method, you can &quot;borrow&quot; it from objects parent in a way you can call superclass&#039; constructor calling parent::__construct</description>
		<content:encoded><![CDATA[<p>Against what @Ren said, I don&#8217;t think that __clone method should be considered &#8220;magic method&#8221; (even tho it is) in a way as __call or __set magic methods but in a way as __construct or __destruct. There&#8217;s a solid unambiguous point when objects __clone method is called, on keyword clone (compare to new keyword).</p>
<p>One point to notice, even tho you cannot overload clone method, you can &#8220;borrow&#8221; it from objects parent in a way you can call superclass&#8217; constructor calling parent::__construct</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on PHP Constructor Best Practices And The Prototype Pattern by Mingomax</title>
		<link>http://ralphschindler.com/2012/03/09/php-constructor-best-practices-and-the-prototype-pattern/comment-page-1#comment-67148</link>
		<dc:creator>Mingomax</dc:creator>
		<pubDate>Wed, 21 Mar 2012 21:42:05 +0000</pubDate>
		<guid isPermaLink="false">http://ralphschindler.com/?p=166#comment-67148</guid>
		<description>Ralph, hi from Brazil, your post its very nice and clarified certain dogmas that had on the use of some patterns and your article told me. 

Excellent.

Tks.</description>
		<content:encoded><![CDATA[<p>Ralph, hi from Brazil, your post its very nice and clarified certain dogmas that had on the use of some patterns and your article told me. </p>
<p>Excellent.</p>
<p>Tks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Database Abstraction Layers Must Live! by Building layers on data access (Part 1)</title>
		<link>http://ralphschindler.com/2009/07/15/database-abstraction-layers-must-live/comment-page-1#comment-66692</link>
		<dc:creator>Building layers on data access (Part 1)</dc:creator>
		<pubDate>Sat, 17 Mar 2012 08:54:24 +0000</pubDate>
		<guid isPermaLink="false">http://ralphschindler.com/?p=26#comment-66692</guid>
		<description>[...] step to abstract data handling is to start using database abstraction, database abstraction must live. We&#8217;re not using code only to support different database vendors, but to ease the [...]</description>
		<content:encoded><![CDATA[<p>[...] step to abstract data handling is to start using database abstraction, database abstraction must live. We&#8217;re not using code only to support different database vendors, but to ease the [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on PHP Constructor Best Practices And The Prototype Pattern by John Congdon</title>
		<link>http://ralphschindler.com/2012/03/09/php-constructor-best-practices-and-the-prototype-pattern/comment-page-1#comment-66515</link>
		<dc:creator>John Congdon</dc:creator>
		<pubDate>Thu, 15 Mar 2012 12:35:25 +0000</pubDate>
		<guid isPermaLink="false">http://ralphschindler.com/?p=166#comment-66515</guid>
		<description>I think Ralph is just sharing options.  I appreciate seeing code in a new way.  I like putting pieces of information like this into my toolbox, as it helps me think about all potential solutions and not just fall back to what I already know and use.

At the same time, having all of these useful comments has been great to also give me an insight into other opinions.

Thank you for the time to write this post and share.</description>
		<content:encoded><![CDATA[<p>I think Ralph is just sharing options.  I appreciate seeing code in a new way.  I like putting pieces of information like this into my toolbox, as it helps me think about all potential solutions and not just fall back to what I already know and use.</p>
<p>At the same time, having all of these useful comments has been great to also give me an insight into other opinions.</p>
<p>Thank you for the time to write this post and share.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on PHP Constructor Best Practices And The Prototype Pattern by Greg</title>
		<link>http://ralphschindler.com/2012/03/09/php-constructor-best-practices-and-the-prototype-pattern/comment-page-1#comment-66265</link>
		<dc:creator>Greg</dc:creator>
		<pubDate>Tue, 13 Mar 2012 05:54:44 +0000</pubDate>
		<guid isPermaLink="false">http://ralphschindler.com/?p=166#comment-66265</guid>
		<description>Ralph, very nice post. I&#039;m always a little more a little more educated and in awe of your references.

This would be ideal for the Zend Paginator?

Maybe Off Topic, but is the Zend_Autoloader SOLID?</description>
		<content:encoded><![CDATA[<p>Ralph, very nice post. I&#8217;m always a little more a little more educated and in awe of your references.</p>
<p>This would be ideal for the Zend Paginator?</p>
<p>Maybe Off Topic, but is the Zend_Autoloader SOLID?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on PHP Constructor Best Practices And The Prototype Pattern by Rob...</title>
		<link>http://ralphschindler.com/2012/03/09/php-constructor-best-practices-and-the-prototype-pattern/comment-page-1#comment-66263</link>
		<dc:creator>Rob...</dc:creator>
		<pubDate>Tue, 13 Mar 2012 05:52:53 +0000</pubDate>
		<guid isPermaLink="false">http://ralphschindler.com/?p=166#comment-66263</guid>
		<description>Whilst I appreciate the benefits that the prototype pattern brings, like Ren, I&#039;m not completely comfortable with objects that aren&#039;t fully initialised after the constructor finishes. When I was cutting my teeth on C++ back in the days of Win16, this was called two-stage construction and was not considered a wise design decision. Maybe I&#039;m just old fashioned and old habits die hard.

Regards,

Rob...</description>
		<content:encoded><![CDATA[<p>Whilst I appreciate the benefits that the prototype pattern brings, like Ren, I&#8217;m not completely comfortable with objects that aren&#8217;t fully initialised after the constructor finishes. When I was cutting my teeth on C++ back in the days of Win16, this was called two-stage construction and was not considered a wise design decision. Maybe I&#8217;m just old fashioned and old habits die hard.</p>
<p>Regards,</p>
<p>Rob&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on PHP Constructor Best Practices And The Prototype Pattern by Lukas</title>
		<link>http://ralphschindler.com/2012/03/09/php-constructor-best-practices-and-the-prototype-pattern/comment-page-1#comment-66081</link>
		<dc:creator>Lukas</dc:creator>
		<pubDate>Mon, 12 Mar 2012 14:39:54 +0000</pubDate>
		<guid isPermaLink="false">http://ralphschindler.com/?p=166#comment-66081</guid>
		<description>@Gerard i assume you are partially complaining about PSR-0 here? the right solution is for APC to finally become hosted friendly and be bundled with PHP. but there are other solutions for shared host users without APC, including simply having a script that appends common classes into a single file that is loaded once.

as for your concern about lazy loading. most of the time if you need to lazy load a dependency, then probably you should move the logic to a different class anyway. classes with lots of optional dependencies are a code smell. additionally you can always still implement lazy creating of connections etc. once you are just creating objects without doing expensive stuff like opening files or remote connections, then you solved most of the issues from making instances of optional dependencies.</description>
		<content:encoded><![CDATA[<p>@Gerard i assume you are partially complaining about PSR-0 here? the right solution is for APC to finally become hosted friendly and be bundled with PHP. but there are other solutions for shared host users without APC, including simply having a script that appends common classes into a single file that is loaded once.</p>
<p>as for your concern about lazy loading. most of the time if you need to lazy load a dependency, then probably you should move the logic to a different class anyway. classes with lots of optional dependencies are a code smell. additionally you can always still implement lazy creating of connections etc. once you are just creating objects without doing expensive stuff like opening files or remote connections, then you solved most of the issues from making instances of optional dependencies.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on PHP Constructor Best Practices And The Prototype Pattern by Wojciech Soczyński</title>
		<link>http://ralphschindler.com/2012/03/09/php-constructor-best-practices-and-the-prototype-pattern/comment-page-1#comment-66072</link>
		<dc:creator>Wojciech Soczyński</dc:creator>
		<pubDate>Mon, 12 Mar 2012 12:19:25 +0000</pubDate>
		<guid isPermaLink="false">http://ralphschindler.com/?p=166#comment-66072</guid>
		<description>@Giorgio - I agree with you, but in my opinion we don&#039;t need multiple constructor signatures, as you said we can have static factory methods witch convert their arguments to fit the constructor. I think also, that in case when your object doesn&#039;t need some fields initialized (in some usage contexts), you should create a separate class with a different constructor, rather than have constructors with different signatures.</description>
		<content:encoded><![CDATA[<p>@Giorgio &#8211; I agree with you, but in my opinion we don&#8217;t need multiple constructor signatures, as you said we can have static factory methods witch convert their arguments to fit the constructor. I think also, that in case when your object doesn&#8217;t need some fields initialized (in some usage contexts), you should create a separate class with a different constructor, rather than have constructors with different signatures.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on PHP Constructor Best Practices And The Prototype Pattern by Gabriel</title>
		<link>http://ralphschindler.com/2012/03/09/php-constructor-best-practices-and-the-prototype-pattern/comment-page-1#comment-66066</link>
		<dc:creator>Gabriel</dc:creator>
		<pubDate>Mon, 12 Mar 2012 10:38:12 +0000</pubDate>
		<guid isPermaLink="false">http://ralphschindler.com/?p=166#comment-66066</guid>
		<description>@Gerard: I think the issue of file access being expensive is somewhat mitigated when you&#039;re using a Bytecode cache like APC (which you should do anyway).</description>
		<content:encoded><![CDATA[<p>@Gerard: I think the issue of file access being expensive is somewhat mitigated when you&#8217;re using a Bytecode cache like APC (which you should do anyway).</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Served from: ralphschindler.com @ 2012-05-17 16:21:16 -->
