<?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 00:16:55 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Community News: PHPBestPractices.org - A Short Practical Guide]]></title>
      <guid>http://www.phpdeveloper.org/news/18396</guid>
      <link>http://www.phpdeveloper.org/news/18396</link>
      <description><![CDATA[<p>
There's another site tossing their hat into the "best practices in PHP" ring (the other being <a href="http://phptherightway.com">PHP The Right Way</a>) with what they call a "short, practical list for common and confusing tasks" in PHP - <a href="http://phpbestpractices.org/">PHPBestPractices.org</a>.
</p>
<blockquote>
[Outdated tutorials and information is] one of the reasons why new PHP programmers are so frequently blamed for ugly, outdated, or insecure code. They can't help it if the first Google result was a four year old article teaching a five year old method! This document tries to address that. It's an attempt to compile a set of basic instructions for what can be considered best practices for common and confusing issues and tasks in PHP. If a low-level task has multiple and confusing approaches in PHP, it belongs here.
</blockquote>
<p>The site has sections for topics like:</p>
<ul>
<li><a href="http://phpbestpractices.org/#mysql">PHP & MySQL</a>
<li><a href="http://phpbestpractices.org/#quotes">Single vs Double Quotes</a>
<li><a href="http://phpbestpractices.org/#regex">PHP regular expressions</a>
<li><a href="http://phpbestpractices.org/#validating-emails">Validating emails</a>
<li><a href="http://phpbestpractices.org/#checking-for-null">Checking null and false values</a>
</ul>
<p>
If you're interested in helping out and adding more content to the site, <a href="http://phpbestpractices.org/#maintainers">contain the maintainer</a> and let him know.
</p>]]></description>
      <pubDate>Thu, 23 Aug 2012 10:07:01 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Ivo Jansch's Blog: The danger of Fluent interfaces]]></title>
      <guid>http://www.phpdeveloper.org/news/4583</guid>
      <link>http://www.phpdeveloper.org/news/4583</link>
      <description><![CDATA[On <i>Ivo Jansch</i>'s blog today, he takes the other side of things on the issue of <a href="http://www.achievo.org/blog/archives/25-The-danger-of-Fluent-interfaces.html">fluent interfaces.
<p>
<quote>
<i>
After Martin, Mike and Paul have demonstrated the usefulness of Fluent Interfaces, I'd like to take a look at the downside.
<p>
Ironically, Martin's original example already demonstrates the problem. (In the example) newOrder could be implemented in two ways: Create an order and return that new order, and Add an order to this customer and return the customer.
<p>
This can lead to confusion; the 'with()' method employs method b. If you think that newOrder returns an Order, and hence 'with()' is a method of the Order class, look at 'skippable'. Martin states that order lines are skippable. So what's in front of skippable() is an OrderItem. That means that with() must have returned an OrderItem. If that is true, then with() is a method of OrderLine too!
</i>
</quote>
<p>
Confused yet? Well, be sure to <a href="http://www.achievo.org/blog/archives/25-The-danger-of-Fluent-interfaces.html">check out his examples</a> - they help to clear up at least the items mentioned above. His point is that, while the fluent interface does make it more readable, it can also make it more confusing - taking things down to such a simple level can sometimes eliminate some needed complexity to make things work properly (or as the user percieves "properly" to be)...]]></description>
      <pubDate>Fri, 30 Dec 2005 07:07:45 -0600</pubDate>
    </item>
  </channel>
</rss>
