<?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 01:11:56 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Ryan Gantt's Blog: Horizontal reusability with traits in PHP 5.4]]></title>
      <guid>http://www.phpdeveloper.org/news/16765</guid>
      <link>http://www.phpdeveloper.org/news/16765</link>
      <description><![CDATA[<p>
<i>Ryan Gantt</i> has a new tutorial posted to his blog today looking at one of the features in the upcoming PHP 5.4.x releases - traits. Specifically he looks at the <a href="http://zuttonet.com/articles/php-class-traits/">horizontal reusabillity</a> they allow for in your applications.
</p>
<blockquote>
The ability for a class to inherit from multiple parents is maligned by many, but can be a good thing in some situations. For those working in PHP, multiple inheritance has never been an option; classes are limited to one parent, though they can implement many other datatypes through the use of interfaces. Interfaces can lead to code duplication in improperly-factored inheritance hierarchies. Even in well-architected hierarchies, multiple classes that implement similar methods can contain a lot of overlap.
</blockquote>
<p>
He starts with a definition of what traits are and where their real usefulness is (as well as what should be the difference between a class and a trait). He gives an example of a typical hierarchy where two classes extend a parent but then they both need the same functionality. Code duplication's not a possibility and inheritance make run into exposure issues. Traits come to the rescue by dropping in just the feature you need when you need it. His example code shows adding some logging to a simple class via a "Logging" trait and a "Singleton trait" example.
</p>]]></description>
      <pubDate>Wed, 24 Aug 2011 10:42:42 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Lukas Smith's Blog: Horizontal Reuse aka Traits Reloaded]]></title>
      <guid>http://www.phpdeveloper.org/news/14254</guid>
      <link>http://www.phpdeveloper.org/news/14254</link>
      <description><![CDATA[<p>
In a quick post to his blog <i>Lukas Smith</i> talks about the <a href="http://pooteeweet.org/blog/0/1717#m1717">proposal for traits support</a> that's been pending for PHP for a while now. Recent updates have been made to it, so it's come back up to the front of developer's minds:
</p>
<blockquote>
Stefan has since <a href="http://wiki.php.net/rfc/nonbreakabletraits">tweaked</a> the proposal and in the <a href="http://wiki.php.net/rfc/horizontalreuse">latest version</a> it includes an alternative approach called Grafts along with the original Traits idea, which is essentially language level delegation pattern support. I am absolutely sure that we will either see Traits or Grafts in the next non patch release of PHP (aka 5.4 or 6.0). 
</blockquote>
<p>
<i>Lukas</i> would like to see the support go in sooner than later, so he requests some comments and thoughts on <a href="http://wiki.php.net/rfc/horizontalreuse">the proposed functionality</a> and to leave them as comments on his blog entry.
</p>]]></description>
      <pubDate>Fri, 26 Mar 2010 10:38:14 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Marco Tabini's Blog: 5 PHP Performance Tips You Probably Don't Want To Hear]]></title>
      <guid>http://www.phpdeveloper.org/news/6875</guid>
      <link>http://www.phpdeveloper.org/news/6875</link>
      <description><![CDATA[<p>
In a new entry on his blog today, <i>Marco Tabini</i> introduces us to <a href="http://blogs.phparch.com/mt/?p=132">5 PHP Performance Tips</a> that we "probably don't want to hear".
</p>
<blockquote>
I thought it might be interesting to write an article about the performance-enhancing tips you probably don't want to hear about - that is, those that are most likely to produce measurable (and durable) results but do require some effort on your part.
</blockquote>
<p>
His list consists of:
<ul>
<li>You Don't Need To Plan Ahead In Order To Have A Plan
<li>Combat Database Abuse
<li>Do You Really Need A Database Anyway?
<li>Scale Horizontally
<li>Refactor To Scale Vertically
</ul>
For each, he explains the title and gives a bit of validation to the point. There's some great mentions of tools that you can use to help accomplish them too - a <a href="http://www.google.com/search?q=php+profiler">profiler</a>, the <a href="http://lucene.apache.org/java/docs/">Lucene</a> and <a href="http://www.xapian.org/">Xapian</a> full-text databases, and <a href="http://www.lustre.org/">Lustre</a>.
</p>]]></description>
      <pubDate>Tue, 12 Dec 2006 13:07:38 -0600</pubDate>
    </item>
  </channel>
</rss>
