<?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 11:00:57 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[PHPMaster.com: Introduction to the Law of Demeter]]></title>
      <guid>http://www.phpdeveloper.org/news/18662</guid>
      <link>http://www.phpdeveloper.org/news/18662</link>
      <description><![CDATA[<p>
On PHPMaster.com today they've posted <a href="http://phpmaster.com/introduction-to-the-law-of-demeter/">an introduction to the Law of Demeter</a>, an idea that promotes loose coupling between objects that each do their own work. This makes it simpler to make pieces interchangeable and more able to focus on their job.
</p>
<blockquote>
With so many heuristics stating how and why software systems should cling to a specific approach, it's pretty disappointing not seeing a broader implementation of them in the world of PHP. For example, the Law of Demeter is probably one of the most underrated in the language's realm. Effectively, the law's "talk to your closest friends" mantra still seems to be in a pretty immature state in PHP, something that contributes to rot in the overall quality of several object-oriented code bases. 
</blockquote>
<p>
They look at how keeping the functionality of each object focused and not "knowing too much" is a good thing and include some examples of working with a service locator, serializer and file storage classes.
</p>]]></description>
      <pubDate>Fri, 26 Oct 2012 12:13:35 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Lukas Smith's Blog: Loose interface coupling]]></title>
      <guid>http://www.phpdeveloper.org/news/17219</guid>
      <link>http://www.phpdeveloper.org/news/17219</link>
      <description><![CDATA[<p>
In a new post to his blog <i>Lukas Smith</i> proposes an idea for a <a href="http://pooteeweet.org/blog/0/2056#m2056">loosely coupled interface setup</a> that would allow for easier integration between third-party libraries and other applications.
</p>
<blockquote>
Especially as for different libraries a different subset of the community could end up collaborating. Here I see 3 options: 1) each library bundles the interfaces (even though they sit in some common namespace), 2) each project asks their users to fetch the common interfaces from some other place 3) runtime "coupling". Option 3) doesn't exist today and is what this blog post is about.
</blockquote>
<p>
He introduces the idea of a "spl_register_compatible_interface" method that would let you compare interfaces to see if they'd mesh. There'd still have to be a lot of communication between developers to make things match, though. He suggests three "practical issues" that libraries/tools would have to overcome to use a system like this - each framework has their own interface setup, the lead time for collaboration could be too much to be worthwhile, a lack of interest from some about collaboration and the idea of competing interface methods. 
</p>
<p>
He's <a href="http://pooteeweet.org/blog/0/2056#m2056">looking for feedback</a> from the community on the idea(s) though, so go and leave a comment with your thoughts!
</p>]]></description>
      <pubDate>Tue, 06 Dec 2011 11:02:18 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Evert Pot's Blog: Numeric string comparison in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/16249</guid>
      <link>http://www.phpdeveloper.org/news/16249</link>
      <description><![CDATA[<p>
In <a href="http://www.rooftopsolutions.nl/blog/numeric-string-comparison-in-php">this new post</a> to his blog <i>Evert Pot</i> reminds you (the PHP developer) about the loose and strict typing checks that you need to do when checking the values of your variables and never just assume. PHP's loose typing tendencies can cause issues if you're not paying attention.
</p>
<blockquote>
As long as you make sure you always use strict checking (=== and !==) where you can, and fall back to the loose checks when you must. As a PHP developer, I think it's very important to understand and memorize exactly how these work, whether you're writing new code, or maintaining existing code.
</blockquote>
<p>
He points out a specific example of some code that seems counter-intuitive when you compare how it reads and how it actually works (strings converted to floats and evaluated)
</p>
<blockquote>
The moral is: always do strict checks when you are able to.
</blockquote>]]></description>
      <pubDate>Tue, 26 Apr 2011 09:23:47 -0500</pubDate>
    </item>
  </channel>
</rss>
