<?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, 24 May 2012 18:48:59 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Rob Allen's Blog: A primer on PHP namespaces]]></title>
      <guid>http://www.phpdeveloper.org/news/17549</guid>
      <link>http://www.phpdeveloper.org/news/17549</link>
      <description><![CDATA[<p>
For those that either haven't worked much with PHP 5.3 in their applications (or just haven't gotten around to using the feature) <i>Rob Allen</i> has <a href="http://akrabat.com/php/a-primer-on-php-namespaces/">put together an introduction to namespaces</a> to guide you through some first steps and share some example usage.
</p>
<blockquote>
I know that there are a lot of posts now about namespaces in PHP 5.3. This is mine which is how I learnt how they work. [...] That is, namespaces allow us to: combine libraries with the same classnames, avoid very long classnames and organise our code easily. Note that namespaces do not just affect classes. They also affect functions and constants.
</blockquote>
<p>
He starts with the basic namespace definition (using the "namespace" keyword), shows how to import another namespace with "use" and the use of the __NAMESPACE__ constant to determine what namespace you're operating in. More information on namespaces can be found <a href="http://php.net/manual/en/language.namespaces.rationale.php">in the PHP manual</a>.
</p>]]></description>
      <pubDate>Thu, 16 Feb 2012 08:25:43 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Query7.com: Why You Should Be Using A PHP Framework]]></title>
      <guid>http://www.phpdeveloper.org/news/16172</guid>
      <link>http://www.phpdeveloper.org/news/16172</link>
      <description><![CDATA[<p>
On the Query7.com blog, <i>Logan</i> has posted his opinion on how you should be doing your development on sites that are more than just one or two pages - you <a href="http://query7.com/why-you-should-be-using-a-php-framework">should be using a framework</a>.
</p>
<blockquote>
Frameworks should be used when constructing web applications. Any application that involves a database, forms, sessions, cookies or a remote service (such as Twitter or Facebook) will benefit from being powered by a framework. There is no need to use a framework for a website that has only one or two pages, nor for command line utility scripts.
</blockquote>
<p>
He lists some of the common features frameworks provide including database abstraction, caching, form management, authentication and internationalization. He also includes some of the more general benefits you get from using frameworks like portability, shorter development time, application security, plugins/module support and the enforcement of good coding standards (depends on the framework, obviously).
</p>]]></description>
      <pubDate>Mon, 11 Apr 2011 09:58:14 -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[Evert Pot's Blog: Taking advantage of PHP namespaces with older code]]></title>
      <guid>http://www.phpdeveloper.org/news/15838</guid>
      <link>http://www.phpdeveloper.org/news/15838</link>
      <description><![CDATA[<p>
<i>Evert Pot</i> has <a href="http://www.rooftopsolutions.nl/blog/taking-advantage-of-php-namespaces-with-older-code">a quick post</a> about a suggestion mentioned at <a href="http://conference.phpbenelux.eu/2011/">PHPBenelux</a> related to using namespaces with older code.
</p>
<blockquote>
If you're running PHP 5.3 and you have to use pesky old code that uses long class prefixes (yea, so, pretty much all PHP code out there), you can still make use of namespace features to shorten them.
</blockquote>
<p>
He includes a quick example that shows the shift from using the traditional Zend_Controller_Action_Helper_AutoComplete_Abstract to an aliasing with the use/as to just reference it as AutoComplete.
</p>]]></description>
      <pubDate>Tue, 01 Feb 2011 10:10:35 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Kevin Schroder's Blog: You want to do WHAT with PHP?]]></title>
      <guid>http://www.phpdeveloper.org/news/14995</guid>
      <link>http://www.phpdeveloper.org/news/14995</link>
      <description><![CDATA[<p>
In a new post to his blog <i>Kevin Schroeder</i> talks about <a href="http://www.eschrade.com/page/want-what-with-4c6d63c8">a book he's written</a> about some of the stranger things you can do with PHP - <a href="http://www.mc-store.com/5112.html">You want to do WHAT with PHP?</a>.
</p>
<blockquote>
You will not find another book on the market like it.  Mostly because other PHP authors are not as crazy as I am. [...] In short, if you want a book that goes beyond the practical for the purpose of expanding your mind, this is the book for you.  It is not meant to be a "cookbook", pre se.  It is meant to, as Einstein put it, stretch your mind so that it does not return to its original shape. 
</blockquote>
<p>
You can see the <a href="http://www.mcpressonline.com/product_images/BookPDFs/5112_TOC.pdf">table of contents</a> [pdf] and a <a href="http://www.mcpressonline.com/product_images/BookPDFs/5112_EXP.pdf">sample chapter</a> [pdf] about working with daemons. Other topics covered include networking/sockets, streams, character encoding, debugging, profiling and good development practices. You can pick up your copy on the <a href="http://www.mc-store.com/5112.html">MC Press</a> site and have it shipped in early September 2010.
</p>]]></description>
      <pubDate>Fri, 20 Aug 2010 08:50:52 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Ivo Jansch's Blog: Good use of public, private and protected in OO class design]]></title>
      <guid>http://www.phpdeveloper.org/news/14811</guid>
      <link>http://www.phpdeveloper.org/news/14811</link>
      <description><![CDATA[<p>
In a new post to his blog <i>Ivo Jansch</i> responds to some of the recent comments about scoping in PHP applications with some <a href="http://www.jansch.nl/2010/07/19/good-use-of-public-private-and-protected-in-oo-class-design/">thoughts of his own</a> (someone spurred on by the <a href="http://symfony-project.org">Symfony</a> project saying that "private is evil").
</p>
<blockquote>
I don't care much about Symfony as I'm not a user, but it turned to a discussion on OO theory when Stefan <A href="http://www.leftontheweb.com/message/My_privates_are_not_public_they_are_protected">defended the position</a> by claiming that you 'should have the right to extend a class's methods if it doesn't support the use case you have'.
</blockquote>
<p>
He also mentions the agreeing opinions of <a href="http://twitter.com/mtabini/status/18867470296">Marco Tabini</a> and <a href="http://twitter.com/tswicegood/status/18864493405">Travis Swicegood</a>. <i>Ivo</i> gives an example of a piece of code that uses all three states - public, protected and private - as a use case for his later statements. In his opinion, removing the private/protected scoping from the picture only helps those looking to make it easier to derive information from the class rather than fine-tuning what can be called.
</p>
<p>
Be sure to <a href="http://www.jansch.nl/2010/07/19/good-use-of-public-private-and-protected-in-oo-class-design/#comments">read the comments</a> on this one - there's lots of great thoughts from community members in there.
</p>]]></description>
      <pubDate>Mon, 19 Jul 2010 10:57:14 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[php|architect Blog: To use a framework, or not to: that is the question ]]></title>
      <guid>http://www.phpdeveloper.org/news/14296</guid>
      <link>http://www.phpdeveloper.org/news/14296</link>
      <description><![CDATA[<p>
On the php|architect blog there's a recent post from <i>Jayesh Wadhwani</i> asking a question developers all over the world wonder every day - <a href="http://www.phparch.com/2010/04/02/to-use-a-framework-or-not-to-that-is-the-question/">to use a framework or not to</a> (and what's the benefit)?
</p>
<blockquote>
A framework is usually thought of or defined as an underlying structure.  You could imagine a wooden structure, sort of a skeleton when a house is being built. This provides a guide, structure and flow to build the house. A programming framework pretty much does the same thing.  A programming framework provides for a structured and disciplined programming which results in a more consistent output from a programming team.
</blockquote>
<p>
He talks more about some of the things that come with framework use like the utility and "housekeeping" code as well as code you know has been tested and used by other projects successfully (especially with something like the <a href="http://framework.zend.com">Zend Framework</a>. Remember, though, there's bad that comes with them - a possible steep learning curve and overhead that could be caused by using the tools it gives you badly.
</p>]]></description>
      <pubDate>Mon, 05 Apr 2010 10:05:20 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[SitePoint PHP Blog: Are PHP Namespaces Really So Bad?]]></title>
      <guid>http://www.phpdeveloper.org/news/13038</guid>
      <link>http://www.phpdeveloper.org/news/13038</link>
      <description><![CDATA[<p>
In <a href="http://www.sitepoint.com/blogs/2009/08/13/are-php-namespaces-bad/">this new post</a> to the SitePoint PHP blog, <i>Craig Buckler</i> asks a question about one of the newest features of PHP, namespaces - are they really so bad?
</p>
<blockquote>
PHP developers have been <a href="http://www.petitiononline.com/phpns/petition.html">demanding namespaces</a> for some time. As PHP applications have grown larger and more complex, namespaces have become essential to prevent code clashes. [...] Unlike C# and Java, PHP has to retain compatibility with non-namespaced code. That has been achieved and you can choose whether to use namespaces or not.
</blockquote>
<p>
He <a href="http://www.sitepoint.com/blogs/2009/08/13/are-php-namespaces-bad/">includes an example</a> of the method that was previously considered (the double-colon) and the final spec using the slashes.
</p>]]></description>
      <pubDate>Thu, 13 Aug 2009 09:29:14 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[NETTUTS.com: 15 Wonderfully Creative Uses for PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/12446</guid>
      <link>http://www.phpdeveloper.org/news/12446</link>
      <description><![CDATA[<p>
NETTUTS.com has <a href="http://net.tutsplus.com/tutorials/php/15-wonderfully-creative-uses-for-php/">posted their list</a> of the top fifteen "wonderfully creative" uses for PHP on your sites.
</p>
<blockquote>
If you are familiar with the basics of PHP, then you're probably wondering how you can use it to make your website more appealing. The possibilities are endless, and you can write your own PHP scripts or implement widely available scripts from around the web. Let's get started with 15 creative uses for PHP for your website!
</blockquote>
<p>Some of the uses mentioned include:</p>
<ul>
<li>E-Commerce
<li>Graphical User Interface
<li>Building an Online Community
<li>Parsing XML Files
<li>Image Processing and Generation
<li>Create a PHP Photo Gallery
</ul>
<p>
Others include templating, working with Flash and with one of the more popular PHP blogging tools - WordPress.
</p>]]></description>
      <pubDate>Mon, 04 May 2009 07:56:42 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPBuilder.com: Introduction to Arrays and Hashes in PHP - The ABC's of PHP Part 7]]></title>
      <guid>http://www.phpdeveloper.org/news/12430</guid>
      <link>http://www.phpdeveloper.org/news/12430</link>
      <description><![CDATA[<p>
PHPBuilder.com has posted <a href="http://www.phpbuilder.com/columns/peter_shaw04282009.php3">the seventh part</a> of their "ABCs of PHP" series - a look at arrays and hashes.
</p>
<blockquote>
An array is a list of a certain variable type, where each item in the list can be referenced by a unique index number, usually starting at 0. [...] Like any other variable type, PHP will automatically define a variable type and set it up for you when you start using it, however in most cases (and it's good practice) you should usually pre-declare your intention to use an array, especially if you don't know in advance what your going to be storing in it.
</blockquote>
<p>
The <a href="http://www.phpbuilder.com/columns/peter_shaw04282009.php3">article</a> talks about what arrays are, how to create them, manipulating them with functions like <a href="http://php.net/array_splice">array_splice</a> and creating subarrays.
</p>]]></description>
      <pubDate>Thu, 30 Apr 2009 07:57:08 -0500</pubDate>
    </item>
  </channel>
</rss>

