<?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 PHP Design Patterns</title>
	<atom:link href="http://www.php5dp.com/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.php5dp.com</link>
	<description>Object Oriented Programming and Reusable Code</description>
	<lastBuildDate>Fri, 19 Aug 2011 09:04:41 +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 PHP Chain of Responsibility : Making a Selection by nbari</title>
		<link>http://www.php5dp.com/chain-of-responsibility-making-a-selection/comment-page-1/#comment-498</link>
		<dc:creator>nbari</dc:creator>
		<pubDate>Fri, 19 Aug 2011 09:04:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.php5dp.com/?p=8#comment-498</guid>
		<description>This pattern could be an alternative to use many if /else / else if, with classes in  cleaner way.

Excellent article.</description>
		<content:encoded><![CDATA[<p>This pattern could be an alternative to use many if /else / else if, with classes in  cleaner way.</p>
<p>Excellent article.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on PHP Proxy Design Pattern: Protect Your Assets by Ing. Armando Ibarra</title>
		<link>http://www.php5dp.com/php-proxy-design-pattern-protect-your-assets/comment-page-1/#comment-494</link>
		<dc:creator>Ing. Armando Ibarra</dc:creator>
		<pubDate>Thu, 18 Aug 2011 22:34:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.php5dp.com/?p=39#comment-494</guid>
		<description>Hi!

I use the proxy design pattern to control access to the functions of the web application, using ACL &#039;s. In order to control every operation you can perform the user.

In my opinion I think it&#039;s best to use the interface instead of abstract class, because as you say if you get more safety data connection to the database, but if another developer creates a class:

How do you do to control that actually implements the proxy?</description>
		<content:encoded><![CDATA[<p>Hi!</p>
<p>I use the proxy design pattern to control access to the functions of the web application, using ACL &#8216;s. In order to control every operation you can perform the user.</p>
<p>In my opinion I think it&#8217;s best to use the interface instead of abstract class, because as you say if you get more safety data connection to the database, but if another developer creates a class:</p>
<p>How do you do to control that actually implements the proxy?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on PHP Decorator Design Pattern: Accessorizing Your Classes by Abba Bryant</title>
		<link>http://www.php5dp.com/php-decorator-design-pattern-accessorizing-your-classes/comment-page-1/#comment-364</link>
		<dc:creator>Abba Bryant</dc:creator>
		<pubDate>Wed, 30 Mar 2011 04:55:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.php5dp.com/?p=32#comment-364</guid>
		<description>And by the way, awesome blog.</description>
		<content:encoded><![CDATA[<p>And by the way, awesome blog.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on PHP Decorator Design Pattern: Accessorizing Your Classes by Abba Bryant</title>
		<link>http://www.php5dp.com/php-decorator-design-pattern-accessorizing-your-classes/comment-page-1/#comment-363</link>
		<dc:creator>Abba Bryant</dc:creator>
		<pubDate>Wed, 30 Mar 2011 04:54:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.php5dp.com/?p=32#comment-363</guid>
		<description>Looks like maybe a bad copy paste on the concrete component classes. It would seem that the first example is setting the description member variable correctly but fails to implement IComponent by not having a getComputer method. It does have a getDescription method.

The second example has a correct getComputer method but is setting the computer member variable to what should be it&#039;s description.</description>
		<content:encoded><![CDATA[<p>Looks like maybe a bad copy paste on the concrete component classes. It would seem that the first example is setting the description member variable correctly but fails to implement IComponent by not having a getComputer method. It does have a getDescription method.</p>
<p>The second example has a correct getComputer method but is setting the computer member variable to what should be it&#8217;s description.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on PHP Decorator Design Pattern: Accessorizing Your Classes by Shane Edwards</title>
		<link>http://www.php5dp.com/php-decorator-design-pattern-accessorizing-your-classes/comment-page-1/#comment-358</link>
		<dc:creator>Shane Edwards</dc:creator>
		<pubDate>Mon, 28 Mar 2011 15:27:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.php5dp.com/?p=32#comment-358</guid>
		<description>Hi,
I&#039;ve enjoyed reading your article. Please forgive me if I&#039;m wrong, I&#039;m not an experienced programmer but wouldn&#039;t the line in the client constructor: print $this-&gt;computerNow-&gt;getComputer() return null for a new Dell() object?
Shane</description>
		<content:encoded><![CDATA[<p>Hi,<br />
I&#8217;ve enjoyed reading your article. Please forgive me if I&#8217;m wrong, I&#8217;m not an experienced programmer but wouldn&#8217;t the line in the client constructor: print $this-&gt;computerNow-&gt;getComputer() return null for a new Dell() object?<br />
Shane</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Private Methods in PHP by William Sanders</title>
		<link>http://www.php5dp.com/private-methods-in-php/comment-page-1/#comment-188</link>
		<dc:creator>William Sanders</dc:creator>
		<pubDate>Mon, 18 Oct 2010 18:19:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.php5dp.com/?p=26#comment-188</guid>
		<description>Hi Yehosef,

Great question. I like to use private variables/functions whenever possible to insure encapsulation. If I have an abstract class where I know I will be subclassing a lot, I&#039;ll use protected methods/variables.

You can use privately declared variables in protected methods or even public methods.  For example,
&lt;pre lang=&quot;php&quot; colla=&quot;+&quot;&gt;
private $foo;

public function bar()
{
   $foo=&quot;hello&quot;;
   return $foo;

}
&lt;/pre&gt;
Kindest regards,
Bill</description>
		<content:encoded><![CDATA[<p>Hi Yehosef,</p>
<p>Great question. I like to use private variables/functions whenever possible to insure encapsulation. If I have an abstract class where I know I will be subclassing a lot, I&#8217;ll use protected methods/variables.</p>
<p>You can use privately declared variables in protected methods or even public methods.  For example,</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p26code1'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p261"><td class="code" id="p26code1"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000088;">$foo</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> bar<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
   <span style="color: #000088;">$foo</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;hello&quot;</span><span style="color: #339933;">;</span>
   <span style="color: #b1b100;">return</span> <span style="color: #000088;">$foo</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>Kindest regards,<br />
Bill</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Private Methods in PHP by Yehosef</title>
		<link>http://www.php5dp.com/private-methods-in-php/comment-page-1/#comment-187</link>
		<dc:creator>Yehosef</dc:creator>
		<pubDate>Mon, 11 Oct 2010 11:39:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.php5dp.com/?p=26#comment-187</guid>
		<description>Do you have any insights on when to use private vs protected methods?  The problem is private is extended classes don&#039;t have access to them.  It seems there may be some cases in which this is desirable, but that most time protected is a better choice.  Do you have some guidelines?</description>
		<content:encoded><![CDATA[<p>Do you have any insights on when to use private vs protected methods?  The problem is private is extended classes don&#8217;t have access to them.  It seems there may be some cases in which this is desirable, but that most time protected is a better choice.  Do you have some guidelines?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on PHP Proxy Design Pattern: Protect Your Assets by William Sanders</title>
		<link>http://www.php5dp.com/php-proxy-design-pattern-protect-your-assets/comment-page-1/#comment-182</link>
		<dc:creator>William Sanders</dc:creator>
		<pubDate>Sat, 25 Sep 2010 08:13:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.php5dp.com/?p=39#comment-182</guid>
		<description>Hi Albert,

Sorry I haven&#039;t responded until now, but I&#039;ve been busy with different projects I&#039;ve had to take care of. Soon I hope to have lots more for this blog and try to move through all of the PHP design patterns,

Kindest regards,
Bill</description>
		<content:encoded><![CDATA[<p>Hi Albert,</p>
<p>Sorry I haven&#8217;t responded until now, but I&#8217;ve been busy with different projects I&#8217;ve had to take care of. Soon I hope to have lots more for this blog and try to move through all of the PHP design patterns,</p>
<p>Kindest regards,<br />
Bill</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on PHP Proxy Design Pattern: Protect Your Assets by Albert</title>
		<link>http://www.php5dp.com/php-proxy-design-pattern-protect-your-assets/comment-page-1/#comment-181</link>
		<dc:creator>Albert</dc:creator>
		<pubDate>Mon, 13 Sep 2010 21:50:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.php5dp.com/?p=39#comment-181</guid>
		<description>Congratulations, it&#039;s very interesting article. I&#039;ve read your articles about design pattern and are very interesting. I look foward to reading the next.</description>
		<content:encoded><![CDATA[<p>Congratulations, it&#8217;s very interesting article. I&#8217;ve read your articles about design pattern and are very interesting. I look foward to reading the next.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on PHP Proxy Design Pattern: Protect Your Assets by Tweets that mention PHP Proxy Design Pattern: Protect Your Assets &#124; PHP Design Patterns -- Topsy.com</title>
		<link>http://www.php5dp.com/php-proxy-design-pattern-protect-your-assets/comment-page-1/#comment-149</link>
		<dc:creator>Tweets that mention PHP Proxy Design Pattern: Protect Your Assets &#124; PHP Design Patterns -- Topsy.com</dc:creator>
		<pubDate>Mon, 07 Jun 2010 13:56:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.php5dp.com/?p=39#comment-149</guid>
		<description>[...] This post was mentioned on Twitter by Bill Sanders, Bill Sanders. Bill Sanders said: PHP Proxy Design Pattern: Protect Your Assets http://bit.ly/dBNJYw This is all PHP but pretty easy for any language. Working on AS3 version. [...]</description>
		<content:encoded><![CDATA[<p>[...] This post was mentioned on Twitter by Bill Sanders, Bill Sanders. Bill Sanders said: PHP Proxy Design Pattern: Protect Your Assets <a href="http://bit.ly/dBNJYw" rel="nofollow">http://bit.ly/dBNJYw</a> This is all PHP but pretty easy for any language. Working on AS3 version. [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

