<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Wed, 22 May 2013 23:11:19 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Stefan Koopmanschap's Blog: My privates are not public, they are protected ]]></title>
      <guid>http://www.phpdeveloper.org/news/14814</guid>
      <link>http://www.phpdeveloper.org/news/14814</link>
      <description><![CDATA[<p>
<i>Stefan Koopmanschap</i> has <a href="http://www.leftontheweb.com/message/My_privates_are_not_public_they_are_protected">spoken up in response</a> to some of the comments about OOP design, specifically in using the private scope in your applications. Overall, <i>Stefan</i> agrees and thinks that this access prevents possible extension which goes against the whole point of writing open source software.
</p>
<blockquote>
I agree with pro-private people that it is important to have a good API design and to use that to protect less experienced developers from making mistakes, however one should never assume that the developers using your libraries, especially Open Source libraries, are less than yourself. [...] I definitely am not in favor of simply opening up the complete library to every developer though. By making a clear decision on which methods are public and which methods are protected you will ensure that people simply implementing your library will use the API that you have taken the time designing.
</blockquote>
<p>
His <a href="http://www.leftontheweb.com/message/My_privates_are_not_public_they_are_protected">does note</a>, however, that there are cases when a private scope is valid - usually when it involves a planned, architected product where it is someone's responsibility to have that access controlled.
</p>]]></description>
      <pubDate>Mon, 19 Jul 2010 13:58:12 -0500</pubDate>
    </item>
  </channel>
</rss>
