<?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>Tue, 21 May 2013 00:11:40 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Berry Langerak's Blog: Getters and setters: evil or necessary evil?]]></title>
      <guid>http://www.phpdeveloper.org/news/15898</guid>
      <link>http://www.phpdeveloper.org/news/15898</link>
      <description><![CDATA[<p>
In a new post <i>Berry Langerak</i> wonders if the getters and setters commonly used in PHP applications are a <a href="http://berryllium.nl/2011/02/getters-and-setters-evil-or-necessary-evil/">necessary evil</a> and if they should be used at all.
</p>
<blockquote>
Although I do still feel like getters and setters are to be avoided most of the time, it's hard to tell where to use them and where you shouldn't. [...] While writing the code for [PFZ.nl], I started to notice that each and every class in the system had accessors for most, if not all, protected fields. I've started a discussion with my fellow developers, and this is what I've argued.
</blockquote>
<p>
He mentions a few things including an article he'd written previously on the topic, some of the points behind OOP programming, encapsulation and accessors and collaborators. He also includes several code examples showing what he considers right and wrong ways to do thing (warning, opinions ahead).
</p>
<blockquote>
All in all, I don't think accessors are evil per se, but you should only ever use the accessors in cross-layer situations. Don't use accessors to build functionality, but only because you need the value to display and/or save.
</blockquote>]]></description>
      <pubDate>Mon, 14 Feb 2011 09:57:30 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[php|architect Blog: GOTO in PHP 5.3: is it Really That Evil?]]></title>
      <guid>http://www.phpdeveloper.org/news/12664</guid>
      <link>http://www.phpdeveloper.org/news/12664</link>
      <description><![CDATA[<p>
From <i>Marco Tabini</i> (on the php|architect blog) there's <a href="http://phparch.com/c/news/view/8/GOTO_in_PHP_5_3__is_it_Really_That_Evil_">his look at GOTO</a>, a new feature to be included in PHP 5.3, and whether its a bad/evil thing have in PHP or not. He talks with two developers about its impact.
</p>
<blockquote>
GOTO in PHP? Is that possible? It turns out that it is. GOTO is poised to make its official debug in the upcoming 5.3 release of PHP-and the comments are flowing around the Net. We caught up with Sara Golemon, who introduced the construct in PHP, and with Timothy Boronczyk, who made one of the rare level-headed comments about its use, to shed some light on how GOTO will affect the world of PHP.
</blockquote>
<p>
They look at why GOTO was even on the table for inclusion, how it got started in the PHP code (the target was PHP6) why there's so much controversy over it and how, despite what the naysayers say, it will not be the demise of the language and cause some kind of downward spiral in PHP development.
</p>]]></description>
      <pubDate>Thu, 11 Jun 2009 10:28:02 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Davey Shafik's Blog: Avoiding EVAL()]]></title>
      <guid>http://www.phpdeveloper.org/news/11857</guid>
      <link>http://www.phpdeveloper.org/news/11857</link>
      <description><![CDATA[<p>
<i>Davey Shafik</i> has a <a href="http://pixelated-dreams.com/archives/232-avoiding-eval.html">helpful hint</a> for avoiding one of the worst functions to use in PHP - <a href="http://php.net/eval">eval</a>.
</p>
<blockquote>
There are a shed-load of ways to "eval()" code without actually calling the eval() function '" usually done simply to avoid the use of the dreaded "evil()" function, but often times because the system has eval() disabled using "disable_functions" in php.ini. Here is another simple way to avoid eval() without writing out files to the filesystem
</blockquote>
<p>
His example uses the streams wrapper to natively execute the code from a string variable as a data element, base64 decoded. It's more of a proof-of-concept than anything else, but its an interesting solution to a tough problem to solve at times.
</p>]]></description>
      <pubDate>Mon, 02 Feb 2009 11:15:24 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Mike Lively's Blog: Why I Hate Singletons]]></title>
      <guid>http://www.phpdeveloper.org/news/11634</guid>
      <link>http://www.phpdeveloper.org/news/11634</link>
      <description><![CDATA[<p>
<i>Mike Lively</i> has posted <a href="http://www.ds-o.com/archives/77-Why-I-Hate-Singletons.html">a few choice words</a> about one of the most popular and most used design patterns out there - the Singleton.
</p>
<blockquote>
One of the most derided, yet most loved and used patterns is the singleton pattern. Its supporters continually praise its ability to limit instantiation of objects and its opponents continually chastise its tendency to be little more than a glorified global. While programming in many ways boils down to a matter of preference (you can always find someone that agrees with you,) I thought I might as well document my opinion so that those who don't care can have one more thing to ignore. 
</blockquote>
<p>
He starts by (<a href="http://www.ds-o.com/exit.php?url_id=231&entry_id=77">correctly</a>) defining a Singleton and why, because of that definition, they are evil - they become a "global point of access". Why is that such a bad thing, you ask? <i>Mike</i> By their design they mask dependencies, making it harder to do future development and/or maintenance.
</p>
<blockquote>
I personally do not see very many viable uses for singletons and I know there are many people that agree with me (google <a href="http://www.ds-o.com/exit.php?url_id=235&entry_id=77">evil singletons</a>). It's simplicity seems appealing, but they are incredibly easy to use in a damaging way. This is the danger you risk with any concept that is easy to understand and easy to abuse. 
</blockquote>]]></description>
      <pubDate>Mon, 29 Dec 2008 12:05:45 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Ibuildings Blog: The definition of evil]]></title>
      <guid>http://www.phpdeveloper.org/news/10820</guid>
      <link>http://www.phpdeveloper.org/news/10820</link>
      <description><![CDATA[<p>
On the Ibuildings blog there's a <a href="http://www.ibuildings.com/blog/archives/1211-The-definition-of-evil.html">new post</a> that looks at the "evils" of a crucial part of many web applications - caching.
</p>
<blockquote>
Recently a colleague stated that in theory, caching could be considered 'evil'. Now 'evil' is a very broad term which is used a lot in the IT community, but what does it really mean when we're talking about technical solutions? I asked around, but couldn't find a clear cut definition, so I went searching...
</blockquote>
<p>
In his search he came across a wide range of definitions, including one mentioning bad design or implying a lack of goals with a summarized meaning of "does harm to your aesthetic and engineering judgment". He applies this to caching and, because of it being a sort of counter-intuitive way to handle content (not just the pull and push), it could be considered slightly evil. Interesting interpretation...
</p>
<blockquote>
However, as anyone will tell you caching is a very necessary evil. [...] So while it does some minor harm to aesthetic and engineering judgment, the user gets a fast experience, which is really all that matters in the end.
</blockquote>]]></description>
      <pubDate>Wed, 13 Aug 2008 08:44:17 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Marco Tabini's Blog: The master conference (evil) plan]]></title>
      <guid>http://www.phpdeveloper.org/news/10270</guid>
      <link>http://www.phpdeveloper.org/news/10270</link>
      <description><![CDATA[<p>
In the wake of this year's <a href="http://tek.phparch.com">php|tek</a> conference, <i>Marco Tabini</i> has <a href="http://mtabini.blogspot.com/2008/05/master-conference-evil-plan.html">unveiled his secrets</a> to the "master conference evil plan" that he and the php|architect crew have been putting in to action for their conferences:
</p>
<blockquote>
For the past four years, I have put a lot of work into executing a strategic plan that is tangentially connected with our conferences. [...] Instead [of trying to force interaction], I decided to try and slowly steer things in a direction that would have made our conferences closer to a family reunion than a dry business meetup. 
</blockquote>
<p>
He mentions the steps in his "evil plan" (for conference domination?) - community participation, setting the right atmosphere for the exchange of ideas, the oh-so-secret choosing of the speakers and their leadership by example through participation with the speakers and other conference goers.
</p>]]></description>
      <pubDate>Mon, 26 May 2008 13:58:16 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Felix Geisendorfer's Blog: PHP 5.2.1 was a evil release - check your server]]></title>
      <guid>http://www.phpdeveloper.org/news/8740</guid>
      <link>http://www.phpdeveloper.org/news/8740</link>
      <description><![CDATA[<p>
<i>Felix Geisendorfer</i> has a <a href="http://www.thinkingphp.org/2007/09/26/php-521-was-a-evil-release-check-your-server/">reminder</a> from developers out there - "PHP 5.2.1 was an evil release":
</p>
<blockquote>
While I was at php|works I heard a lot of people say how bad of a release 5.2.1 was and that I should stay away from it. Well I didn't take it to seriously at this point, but when I checked what version of PHP we are running on my client project recently it turns out it was 5.2.1.
</blockquote>
<p>
They were seeing performance issues (database related) so they upgraded to the latest version, 5.2.4, and immediately saw a performance jump of forty to sixty percent and a much lower amount of CPU usage. Upon some further research, he found <a href="http://bugs.php.net/bug.php?id=40261">a certain bug</a> in 5.2.1 that could have been the culprit.
</p>]]></description>
      <pubDate>Thu, 27 Sep 2007 12:04:00 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[MySQL Performance Blog: Are PHP persistent connections evil ?]]></title>
      <guid>http://www.phpdeveloper.org/news/6699</guid>
      <link>http://www.phpdeveloper.org/news/6699</link>
      <description><![CDATA[<p>
The MySQL Performance Blog takes a look today at a more PHP-related topic - <a href="http://www.mysqlperformanceblog.com/2006/11/12/are-php-persistent-connections-evil/">persistent connections in PHP</a> and whether or not they are the devil (well, okay, so maybe not quest that bad - just a little evil).
</p>
<blockquote>
The reason behind using persistent connections is of course reducing number of connects which are rather expensive, even though they are much faster with MySQL than with most other databases.
</blockquote>
<p>
They <a href="http://www.mysqlperformanceblog.com/2006/11/12/are-php-persistent-connections-evil/">go on</a> to talk about:
<ul>
<li>issues with the number of active connections that could come up
<li>the use of too many connections at once
<li>why persistent connections are disabled in the new mysqli extension
</ul>
Their conclusion? Persistent connections are not evil. In fact, they're very good, when used in the right context and for the right kinds of queries. There's also a small push for an even newer MySQL driver for PHP by the MySQL team - the "mysqlnd" driver.
</p>]]></description>
      <pubDate>Tue, 14 Nov 2006 09:03:00 -0600</pubDate>
    </item>
  </channel>
</rss>
