<?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>Sat, 25 May 2013 08:52:32 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Ralph Schindler's Blog: Autoloading (Revisited)]]></title>
      <guid>http://www.phpdeveloper.org/news/16880</guid>
      <link>http://www.phpdeveloper.org/news/16880</link>
      <description><![CDATA[<p>
<i>Ralph Schindler</i> has a new post to his today looking back at a sort of <a href="http://ralphschindler.com/2011/09/19/autoloading-revisited">history of autoloading</a> and some of what we've learned even in just the journey from PHP 5.0 to 5.3 (and has become best practice in the community).
</p>
<blockquote>
It wasn't until years later that certain best practices had emerged and the prolific usage of require_once/include_once throughout large bodies of code had started drying up. Even after autoloading had been adopted by larger more visible projects, a common patten had yet to emerge. [...]  Fast-forward to today, and we see that this standard for autoloading has agreed upon by a large number of projects and has come to be named the "PSR-0 autoloading standard".
</blockquote>
<p>
He covers some of the things we (the development community) have learned about autoloading and resources in our applications. He talks about the <a href="https://github.com/weierophinney/zf2/blob/master/bin/classmap_generator.php">classmap tool</a> that <i>Matthew Weier O'Phinney</i> developed (and some of its downfalls) as well as a move into PHP namespacing that has helped to make some of the "namespacing" based on class names obsolete. He's noticed a pattern in namespacing already - a self-contained structure that provides more of a "drop in" solution and how that's handled in the code.
</p>]]></description>
      <pubDate>Tue, 20 Sep 2011 09:18:55 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Propel Blog: The End of Autoloading]]></title>
      <guid>http://www.phpdeveloper.org/news/16103</guid>
      <link>http://www.phpdeveloper.org/news/16103</link>
      <description><![CDATA[<p>
On the Propel blog there's a recent post talking about how the <a href="http://propel.posterous.com/the-end-of-autoloading">age of autoloading might be ending</a> and how namespacing could be the next logical step (or could it).
</p>
<blockquote>
Autoloading in PHP is a great time saver. It lets you write concise scripts without the knowledge of the exact directory structure of the libraries you use. But with the arrival of namespaces in PHP 5.3, and the influence of Java over new generation PHP frameworks, autoloading is changing. In the near future, explicit autoloading will be ubiquitous, but with none of the advantages of the old style autoloading.
</blockquote>
<p>
He talks about "the old days" when things were included manually through file paths, how that graduated to the SPL autoloading and, most recently, up to namespace autoloading. He shares code samples of how the namespace loading works and how you can abuse it to override current classes/functionality with your own. He points out one interesting correlation though - that the "use" keyword seems a lot like the "require_once" of way back when. He shows how the added verbosity of namespace usage can be a hinderance on frameworks, citing microframeworks specifically and showing one implementation that's non-namespaced next to another that is.
</p>]]></description>
      <pubDate>Fri, 25 Mar 2011 11:13:51 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Martynas Jusevicius' Blog: PHP 5 features: Class autoloading]]></title>
      <guid>http://www.phpdeveloper.org/news/9194</guid>
      <link>http://www.phpdeveloper.org/news/9194</link>
      <description><![CDATA[<p>
<i>Martynas Jusevicius</i> continues his look at the enhanced features that PHP5 has to offer with <a href="http://www.xml.lt/Blog/2007/12/05/PHP+5+features%3A+Class+autoloading">this post</a> focusing on the ability to autoload classes that haven't been defined yet.
</p>
<blockquote>
Continuing the <a href="http://www.xml.lt/Blog/2007/10/07/PHP+5+tips%3A+DateTime+class">series about useful features in PHP 5</a>, another overlooked one is <a href="http://www.php.net/autoload">class autoloading</a>. [...] Basically, you get a class name as a parameter in your __autoload() function, and using it you have to figure out the path to the actual class file and include it.
</blockquote>
<p>
He includes both a description and an example of some code in action and even points out something that can help to make for cleaner, more organized code - the ability to register more than one autloader with the <a href="http://www.php.net/manual/en/function.spl-autoload-register.php">spl_autoload_register</a> function.
</p>]]></description>
      <pubDate>Fri, 07 Dec 2007 10:29:00 -0600</pubDate>
    </item>
  </channel>
</rss>
