<?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>Sun, 12 Feb 2012 19:32:14 -0600</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Vance Lucas' Blog: Protected vs Private Scope: Arrogance, Fear and Handcuffs]]></title>
      <guid>http://www.phpdeveloper.org/news/16148</guid>
      <link>http://www.phpdeveloper.org/news/16148</link>
      <description><![CDATA[<p>
<i>Vance Lucas</i> has tossed his hat into the ring in the debate about private versus protected scope in PHP projects with <a href="http://www.vancelucas.com/blog/protected-vs-private-scope-arrogance-fear-and-handcuffs/">this new post</a> to his blog.
</p>
<blockquote>
The age old private vs protected debate has been re-ignited in the PHP community recently following the decision of Doctrine2 and Symfony2 to make all class methods private until there is a very clear and proven reason to change them to protected or public. The intention is a good one - to ensure they are providing a clear and stable API through intentional and known extension points that they can better test and support. [...] The problem is that this kind of thinking is a slippery slope that kills the spirit of programming.
</blockquote>
<p>
He suggests that, by limiting the scoping down to private, you're taking away the very thing that gets most people excited about third-party tools - the extensibility. In his opinion, it sends a strong message to other developers that they're "not welcome" to make suggestions or updates to the application/tool. 
</p>]]></description>
      <pubDate>Tue, 05 Apr 2011 10:45:53 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Community News: Dutch PHP Conference - Updates to the site and the schedule]]></title>
      <guid>http://www.phpdeveloper.org/news/15959</guid>
      <link>http://www.phpdeveloper.org/news/15959</link>
      <description><![CDATA[<p>
The Dutch PHP Conference has <a href="http://www.phpconference.nl/home/updates-to-the-site-and-the-schedule/">posted an update</a> about the conference today including changes to the schedule and how its represented on the site.
</p>
<blockquote>
t has been about two weeks since the schedule was published and ticket sales started, but that doesn't mean we haven't done anything in the meantime! There have been a number of updates on both the site and the schedule.
</blockquote>
<p>
There's five new talks that've been added to the schedule including <i>Paul Matthews</i>' presentation on Solr, <i>Chris Jones</i> talking about high performance PHP apps and <i>David Soria Parra</i> on git. The site updates mainly revolve around the classification of the different sessions - icons added to show skill level and scope of the presentation. There's also an update about the unconfernece and official conference social.
</p>]]></description>
      <pubDate>Thu, 24 Feb 2011 13:49:39 -0600</pubDate>
    </item>
    <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>
    <item>
      <title><![CDATA[Ivo Jansch's Blog: Good use of public, private and protected in OO class design]]></title>
      <guid>http://www.phpdeveloper.org/news/14811</guid>
      <link>http://www.phpdeveloper.org/news/14811</link>
      <description><![CDATA[<p>
In a new post to his blog <i>Ivo Jansch</i> responds to some of the recent comments about scoping in PHP applications with some <a href="http://www.jansch.nl/2010/07/19/good-use-of-public-private-and-protected-in-oo-class-design/">thoughts of his own</a> (someone spurred on by the <a href="http://symfony-project.org">Symfony</a> project saying that "private is evil").
</p>
<blockquote>
I don't care much about Symfony as I'm not a user, but it turned to a discussion on OO theory when Stefan <A href="http://www.leftontheweb.com/message/My_privates_are_not_public_they_are_protected">defended the position</a> by claiming that you 'should have the right to extend a class's methods if it doesn't support the use case you have'.
</blockquote>
<p>
He also mentions the agreeing opinions of <a href="http://twitter.com/mtabini/status/18867470296">Marco Tabini</a> and <a href="http://twitter.com/tswicegood/status/18864493405">Travis Swicegood</a>. <i>Ivo</i> gives an example of a piece of code that uses all three states - public, protected and private - as a use case for his later statements. In his opinion, removing the private/protected scoping from the picture only helps those looking to make it easier to derive information from the class rather than fine-tuning what can be called.
</p>
<p>
Be sure to <a href="http://www.jansch.nl/2010/07/19/good-use-of-public-private-and-protected-in-oo-class-design/#comments">read the comments</a> on this one - there's lots of great thoughts from community members in there.
</p>]]></description>
      <pubDate>Mon, 19 Jul 2010 10:57:14 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[DevShed: PHP 5 Helpers: Calling Methods Out of Object Scope]]></title>
      <guid>http://www.phpdeveloper.org/news/12946</guid>
      <link>http://www.phpdeveloper.org/news/12946</link>
      <description><![CDATA[<p>
In <a href="http://www.devshed.com/c/a/PHP/PHP-5-Helpers-Calling-Methods-Out-of-Object-Scope">this new tutorial</a> from DevShed today they continue their series looking at making helper classes for your applications. This time they're focusing on using methods without needing to create an object first - static methods.
</p>
<blockquote>
The methods of the class that I [just] mentioned were declared implicitly dynamic, even though it's perfectly possible to call them statically, and the PHP engine won't raise any errors about this process. However, it would be much better to declare these methods explicitly static, thus taking advantage of the functionality offered by the text helper class without having to spawn an instance of it.
</blockquote>
<p>
They show how to <a href="http://www.devshed.com/c/a/PHP/PHP-5-Helpers-Calling-Methods-Out-of-Object-Scope/2/">define the methods</a> with the "static" keyword so they can be called outside of the class' scope. Code for the helper class and the code to put it to use.
</p>]]></description>
      <pubDate>Mon, 27 Jul 2009 12:38:17 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Zend Developer Zone: ZendCon 2009 Call for Papers is now open!]]></title>
      <guid>http://www.phpdeveloper.org/news/12453</guid>
      <link>http://www.phpdeveloper.org/news/12453</link>
      <description><![CDATA[<p>
The Zend Developer Zend has <a href="http://devzone.zend.com/article/4558-ZendCon-2009-Call-for-Papers-is-now-open">posted the announcement</a> that the Call for Papers for this year's <a href="http://zendcon.com">ZendCon - The PHP Conference</a> has been opened.
</p> 
<blockquote>
Welcome to the <a href="http://zendcon.com/">Call for Papers</a> for the 2009 edition of <a href="http://zendcon.com/">ZendCon '" The PHP Conference</a>. This year's conference will be held October 19th '" 22nd at the San Jose Convention Center and is being co-presented by S&S Media. It is the largest gathering of the PHP Community and the premier PHP conference, allowing all attendees to mingle with decision makers, core developers, prominent community members, and so many more.
</blockquote>
<p>
The scope of this year's conference has widened a bit and won't just be about PHP-related topics. Proposals for sessions about things like project lifecycle, frameworks, and performance tuning will also be accepted. There will be five different tracks this year:
</p>
<ul>
<li>Server/Operations
<li>Lifecycle Best Practices
<li>Frameworks
<li>Real World PHP
<li>PHP Development Topics
</ul>
<p>
The Call for Papers ends May 31st, so get over and <a href="http://zendcon.com/">submit your proposal</a> before time runs out!
</p>]]></description>
      <pubDate>Tue, 05 May 2009 07:50:49 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Leonid Mamchenkov's Blog: Perl vs. PHP : variable scoping]]></title>
      <guid>http://www.phpdeveloper.org/news/11559</guid>
      <link>http://www.phpdeveloper.org/news/11559</link>
      <description><![CDATA[<p>
<i>Leonid Mamchenkov</i> has compared Perl versus PHP in <a href="http://mamchenkov.net/wordpress/2008/12/12/perl-vs-php-variable-scoping/">this new blog post</a> - specifically how they handle variable scoping.
</p>
<blockquote>
I've mentioned quite a few times that I am a big fan of Perl programming language.  However, most of my programming time these days is spent in PHP.  The languages are often similar, with PHP having its roots in Perl, and Perl being such a influence in the world of programming languages.  This similarity is often very helpful.  However there are a few difference, some of which are obvious and others are not.
</blockquote>
<p>
His example compares looping (a foreach in both) and how, after the Perl loop the $value variable is no longer accessible. In PHP, however, it's passed back out into the current scope and can be read just like any other variable. While this can be useful, it can also cause headaches when trying to track down elusive bugs.
</p>]]></description>
      <pubDate>Fri, 12 Dec 2008 08:49:14 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Typical Programmer Blog: Doing it wrong: getters and setters]]></title>
      <guid>http://www.phpdeveloper.org/news/10420</guid>
      <link>http://www.phpdeveloper.org/news/10420</link>
      <description><![CDATA[<p>
According to <a href="http://typicalprogrammer.com/?p=23">this new post</a> on the Typical Programmer blog, using getters and setters in your scripts only adds in a bit of unnecessary coupling and complexity to your scripts that you just don't need.
</p>
<blockquote>
Today most of the popular programming languages support objects, limiting scope, modularity, passing by value, and sophisticated built-in types. There should be no reason to deliberately expose an object's data to the rest of the code because the language can enforce encapsulation and data hiding.
</blockquote>
<p>
While not specific to PHP, <a href="http://typicalprogrammer.com/?p=23">the post</a> does recommend against them because of one simple reason common to all languages that make them possible - they "break the encapsulation OOP offers". For them, they're like a cheat to get around bad coding practices and are not needed to make a successful application work.
</p>]]></description>
      <pubDate>Mon, 16 Jun 2008 11:19:17 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Mike Naberezny's Blog: Symfony Templates and Ruby's ERb]]></title>
      <guid>http://www.phpdeveloper.org/news/4865</guid>
      <link>http://www.phpdeveloper.org/news/4865</link>
      <description><![CDATA[In his <a href="http://www.mikenaberezny.com/archives/40">latest blog entry</a>, <i>Mike Naberezny</i> takes a look at the <a href="http://symfony-project.com/">Symfony framework</a> and shares some of his opinions on it.
<p>
<quote>
<i>
One thing that I think Symfony gets right is that it appears to use partitioned PHP code for its templates, in the spirit of <a href="http://www.paul-m-jones.com/">Paul</a>'s <a href="http://www.phpsavant.com/">Savant</a> system.
<p>
I noticed in the Symfony demo that there is no separation of scope between variables passed to the template from the controller and local variables in the template. I'd like to see them scoped properly ("$this->products") but I can certainly understand why they did it this way. Using "$this->" in the template everywhere quickly gets messy.
</i>
</quote>
<p>
He <a href="http://www.mikenaberezny.com/archives/40">mentions</a> a few other items he saw as well, including a way to correct the above mentioned problem (two ways - one more single-instance, the other more global).]]></description>
      <pubDate>Wed, 20 Feb 2008 07:12:36 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Rails for PHP Developers: Three New Articles Posted (Scope, Variables & RegEx)]]></title>
      <guid>http://www.phpdeveloper.org/news/9659</guid>
      <link>http://www.phpdeveloper.org/news/9659</link>
      <description><![CDATA[<p>
<i>Mike Naberezny</i> has posted a few more articles to the "Rails for PHP Developers" website (based on <a href="http://www.pragprog.com/titles/ndphpr">this book</a>) covering some more of the basics.
</p>
<p>There's three new tutorials posted:</p>
<ul>
<li><a href="http://railsforphp.com/2008/02/18/ruby-block-scope/">Ruby Block Scope</a> - the basics of Ruby block scope, a common point of confusion for PHP developers new to Ruby. 
<li><a href="http://railsforphp.com/2008/02/13/variable-arguments/">Variable Arguments</a> - an article that shows two common API patterns found in Rails, variable arguments and option hashes, and how to implement them both in PHP. 
<li><a href="http://railsforphp.com/2008/01/17/regular-expressions-in-ruby/">Regular Expressions in Ruby</a> - a useful reference that maps all of the common PHP regular expression functions to the equivalents in Ruby. 
</ul>
<p>
Check out the <a href="http://railsforphp.com/">rest of the site</a> for even more great content.
</p>]]></description>
      <pubDate>Tue, 19 Feb 2008 08:44:00 -0600</pubDate>
    </item>
  </channel>
</rss>

