<?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>Thu, 23 May 2013 12:30:49 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Phil Sturgeon: Pick PHP Requirements for Packages Responsibly]]></title>
      <guid>http://www.phpdeveloper.org/news/19359</guid>
      <link>http://www.phpdeveloper.org/news/19359</link>
      <description><![CDATA[<p>
In <a href="http://philsturgeon.co.uk/blog/2013/03/pick-php-requirements-for-packages-responsibly">this recent post</a> to his site <i>Phil Sturgeon</i> has a reminder that you should select the dependencies for your packages wisely, and not just because they're "cool."
</p>
<blockquote>
When I say "make sure it is worth it" I mean, don't just switch your arrays from array() to [] just because it looks cool. That was the extent of my original tweet, because I've seen a few packages doing that and it annoyed me immensely. [...] Suffice it to say, if you require a user to upgrade their version of PHP simply so you can use some syntactical sugar inside a package that nobody else is even going to be looking at, then you're an idiot. Beyond that, you're actually hurting the community.
</blockquote>
<p>
He notes that, by requiring users that are currently only at <a href="http://w3techs.com/technologies/details/pl-php/5/all">3.1% of PHP installs</a> to upgrade to 5.4 just to use your library is a quick way to not have your library used. He points out that PHP 5.4 is "more than just []" for arrays and includes a reminder that several projects are still in PHP 5.3-compatibility mode just because that's the widest audience. He also briefly touches on the "push it forward" comments that people have used to justify 5.4-only packages, but notes that it's still not as much up to the developer as it is the web host.
</p>]]></description>
      <pubDate>Mon, 25 Mar 2013 11:22:11 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Brandon Savage: Effective Refactoring Strategies]]></title>
      <guid>http://www.phpdeveloper.org/news/18943</guid>
      <link>http://www.phpdeveloper.org/news/18943</link>
      <description><![CDATA[<p>
In a recent post to his site, <i>Brandon Savage</i> has <a href="http://www.brandonsavage.net/effective-refactoring-strategies/">a few helpful hints</a> to keep in mind when you're refactoring your applications to make them easier to maintain (and possibly perform better) in the future.
</p>
<blockquote>
The downtime [of this week] provides a perfect opportunity for the aspiring software developer to do the one thing they are always told there's no time to do: make the code better for better's sake. With few deadlines and plenty of free time, most developers can get a few hours of refactoring in to their code towards the end of the year. They can rearchitect sections that were implemented with haste in September; they can write tests for sections that were untested in April. Put another way, the "lost week" can be redeemed.
</blockquote>
<p>He has a few recommendations, each including their own brief summary:</p>
<ul>
<li>Test Everything First
<li>One Method, One Job (Also One Class, One Job)
<li>Don't Be Afraid Of More Objects And Classes
<li>Remove Dead, Unused, Unnecessary or Old Code
<li>Document Your Code
</ul>
<p>
Check out the <a href="http://www.brandonsavage.net/effective-refactoring-strategies/">full post</a> for the summaries and links to other useful resources.
</p>]]></description>
      <pubDate>Mon, 24 Dec 2012 11:24:57 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPMaster.com: The Single Responsibility Principle]]></title>
      <guid>http://www.phpdeveloper.org/news/18789</guid>
      <link>http://www.phpdeveloper.org/news/18789</link>
      <description><![CDATA[<p>
On PHPMaster.com today <i>Alejandro Gervasio</i> has a new tutorial posted about the <a href="http://phpmaster.com/the-single-responsibility-principle/">Single Responsibility Principle</a> - a guideline that states that each class should only have one "area of concern" and not try to do to much.
</p>
<blockquote>
One of the most notorious consequences of this rational associative process is that, at some point, we effectively end up creating classes that do too much. The so-called "God class" is quite possibly the most extreme and coarse example of a structure that packages literally piles of unrelated operations behind the fence of the same API, but there are other subtle, more furtive situations where assigning of multiple roles to the same class are harder to track down. [...] What the principle attempts to promote is that classes must always be designed to expose only one area of concern and the set of operations they define and implement must be aimed at fulfilling that concern in particular and nothing else.
</blockquote>
<p>
He starts off with a typical violation of the principle, showing a class that not only handles user data but also includes the functions to work with the database directly as well (insert/update/delete). He refactors this into a few much more manageable classes - a mapping class to handle the database interaction and a "User" class representative of a true user object. 
</p>]]></description>
      <pubDate>Thu, 22 Nov 2012 11:58:06 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[P&aacute;draic Brady: PHP Security: Default Vulnerabilities, Security Omissions & Framing Programmer]]></title>
      <guid>http://www.phpdeveloper.org/news/18406</guid>
      <link>http://www.phpdeveloper.org/news/18406</link>
      <description><![CDATA[<p>
In <a href="http://blog.astrumfutura.com/2012/08/php-security-default-vulnerabilities-security-omissions-and-framing-programmers/">this new post</a> (and <a href="http://phpsecurity.readthedocs.org/en/latest/PHP-Security-Default-Vulnerabilities-Security-Omissions-And-Framing-Programmers.html">this related article</a>) <i>P&aacute;draic Brady</i> shares some of his opinions about default security languages should provide and the <a href="http://en.wikipedia.org/wiki/Secure_by_design">Secure by Design</a> principles.
</p>
<blockquote>
Odd though it may seem, this principle explains some of PHP's greatest security weaknesses. PHP does not explicitly use Secure By Design as a guiding principle when executing features. I'm sure its in the back of developers' minds just as I'm sure it has influenced many if their design decisions, however there are issues when you consider how PHP has influenced the security practices of PHP programmers. The result of not following Secure By Design is that all applications and libraries written in PHP can inherit a number of security vulnerabilities, hereafter referred to as "By-Default Vulnerabilities". 
</blockquote>
<p>
He focuses on what he sees as a responsibility of those creating the language to either default to a more secure architecture or provide information as to why their choices could cause problems. In the <a href="http://phpsecurity.readthedocs.org/en/latest/PHP-Security-Default-Vulnerabilities-Security-Omissions-And-Framing-Programmers.html">extended version</a> of the post, he talks about some specific issues that the language has including SSL/TLS misconfiguration, openings for XML entity injection attacks and limited native filtering for cross-site scripting.
</p>]]></description>
      <pubDate>Mon, 27 Aug 2012 10:05:13 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Freek Lijten's Blog: SOLID - The S is for Single responsibility]]></title>
      <guid>http://www.phpdeveloper.org/news/17723</guid>
      <link>http://www.phpdeveloper.org/news/17723</link>
      <description><![CDATA[<p>
<i>Freek Lijten</i> has <a href="http://www.freeklijten.nl/home/2012/03/23/SOLID-The-S-is-for-Single-responsibility">written up a new post</a> to his blog about a set of development principles that have been getting more press in the PHP community lately - <a href="http://en.wikipedia.org/wiki/SOLID">SOLID</a>. In his post he starts with a look at the "S" in the set - "Single Responsibility".
</p>
<blockquote>
The single responsibility principle isn't all that hard to explain. It states that an object should do one thing, and one thing only. [...]  A responsibility is a reason to change, and a class should only have one of those. Now all of this may sound abstract and since the objective of this series is to avoid just that we'll just dive into the why now.
</blockquote>
<p>
He includes some sample code to illustrate, going with an active record implementation, some of the problems that come with a typical setup including issues with unit testing, bad practice of using the data store directly, etc. He shows a refactored code example that splits out the functionality previously all in the one class ("Bike") into three different ones - one is the normal Bike object, another compares the Bikes and the third works with the data store to handle the <a href="http://en.wikipedia.org/wiki/Create,_read,_update_and_delete">CRUD</a> for the objects.
</p>]]></description>
      <pubDate>Fri, 23 Mar 2012 11:23:59 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Cal Evans' Blog: Man up! (A developer's responsibility to their team)]]></title>
      <guid>http://www.phpdeveloper.org/news/15147</guid>
      <link>http://www.phpdeveloper.org/news/15147</link>
      <description><![CDATA[<p>
<i>Cal Evans</i> <a href="http://blog.calevans.com/2010/09/16/man-up-a-developers-responsibility-to-their-team/">has a suggestion</a> for all of the developers out there not happy with decisions being made at their workplace (or in the contracts they work with) - man up!
</p>
<blockquote>
Look, it's easy. As developers, we see people we don't respect making decisions we don't agree with. I know how difficult this position is because like every other developer in the world, I've been in this position. However, unlike a lot of developers I've talked to in recent years, I don't see "digging my heals in" or whining as alternatives.
</blockquote>
<p>
He suggests one of two alternatives to the situation - either deal with things head-on and get onboard with the decision or jump ship and find something else that suits you better. Sometimes this is a bit easier than others (terminating contracts versus leaving a full-time job), but if you're really that upset with it, it's probably not going to get any better.
</p>
<blockquote>
talk to a lot of people about how to build teams and the cornerstone of any good team is respect. Management has to respect developers and I firmly believe that. However, you as a developers, have to respect management as well. It is a two way street. 
</blockquote>]]></description>
      <pubDate>Fri, 17 Sep 2010 10:05:11 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[DevShed: Introducing the Chain of Responsibility Between PHP Objects]]></title>
      <guid>http://www.phpdeveloper.org/news/6597</guid>
      <link>http://www.phpdeveloper.org/news/6597</link>
      <description><![CDATA[<p>
DevShed is starting off a new series today with <a href="http://www.devshed.com/c/a/PHP/Introducing-the-Chain-of-Responsibility-Between-PHP-Objects/">this first article</a> talking about how to introduce the "chain of responsibility" method in how you use your objects.
</p>
<blockquote>
In this three-part series, I'll show you how to create a chain of responsibility across different classes, which hopefully will give you a better understanding of how this schema can be implemented with PHP. 
</blockquote>
<p>
Since it's just the first part in the esries, they <a href="http://www.devshed.com/c/a/PHP/Introducing-the-Chain-of-Responsibility-Between-PHP-Objects/">start with</a> the whys and hows of the chain of command process before getting on with the actual code. For the foundation, they create some subclasses that will make the parts of the chain. Next up is combining them and, finally, making the "master class" to combine the links of the chain together. They use a "DataServer" example to work with local files.
</p>]]></description>
      <pubDate>Mon, 30 Oct 2006 12:18:00 -0600</pubDate>
    </item>
  </channel>
</rss>
