<?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, 19 Jul 2008 05:47:56 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[PHPImpact Blog: Static Factories vs Public Constructors]]></title>
      <guid>http://www.phpdeveloper.org/news/10638</guid>
      <link>http://www.phpdeveloper.org/news/10638</link>
      <description><![CDATA[<p>
On the PHP::Impact blog <i>Federico Cargnelutti</i> has <a href="http://phpimpact.wordpress.com/2008/07/17/static-factories-vs-public-constructors/">posted a comparison</a> of using static factory methods to create an instance of a class versus making an object, calling the constructor.
</p>
<blockquote>
Normally, creating an instance of a class is done by calling new, which calls the constructor. Static factory provides a static method that returns an instance of the class. So, you are using static factory instead of the constructor. Providing a static factory method instead of a public constructor has both advantages and disadvantages.
</blockquote>
<p>
He includes some of the advantages of the factory method and others for the normal call to create an object. He also mentions some comments made by <i>Dagfinn Reiersol</i> in <a href="http://www.reiersol.com/blog/1_php_in_action/archive/34_public_constructors_considered_harmful.html">a blog post</a> about public constructors.
</p>]]></description>
      <pubDate>Fri, 18 Jul 2008 12:58:31 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Jonathan Snook's Blog: Easier Static Pages for CakePHP 1.2 Update
]]></title>
      <guid>http://www.phpdeveloper.org/news/10556</guid>
      <link>http://www.phpdeveloper.org/news/10556</link>
      <description><![CDATA[<p>
Updating from a <a href="http://www.phpdeveloper.org/news/9567">previous post</a>, <i>Jonathan Snook</i> has updates some of his comments about a simple way to make static pages in your CakePHP framework application:
</p>
<blockquote>
So it seems that the old code I had didn't work in debug mode, although on the current CakePHP 1.2 RC2, I'm not even sure it works at all. However, I decided to take some time to revisit the code. Last time, I simply hacked up the missingAction and missingController calls and it felt kludgy. It looked kludgy.
</blockquote>
<p>
Instead of abusing the error handler like before he decides to opt for this missingAction/missingController combo to handle the fall through. It doesn't seem to be working 100% correctly, though and he's <a href="https://trac.cakephp.org/ticket/5052">put in a ticket</a> to see if its a bug or by design.
</p>]]></description>
      <pubDate>Mon, 07 Jul 2008 12:05:44 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Stefan Mischook's Blog: Why build all your pages in PHP?]]></title>
      <guid>http://www.phpdeveloper.org/news/10196</guid>
      <link>http://www.phpdeveloper.org/news/10196</link>
      <description><![CDATA[<p>
On his blog today, <i>Stefan Mischook</i> shares <a href="http://www.killerphp.com/articles/why-build-all-your-pages-in-php/">his reasoning</a> for making all of your pages PHP pages, regardless of static content or dynamic.
</p>
<blockquote>
By making all your web pages PHP pages from the start, you are basically leaving open the possibility of using PHP in your web pages at any time.
</blockquote>
<p>
By his reasoning, it provides an "out" for you later on should you decide that a page needs to have some dynamic content thrown in there somewhere (without having to change the filename - bad for SEO, supposedly).
</p>]]></description>
      <pubDate>Fri, 16 May 2008 07:54:06 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Michael Kimsal's Blog: Another PHP bugbear…]]></title>
      <guid>http://www.phpdeveloper.org/news/9741</guid>
      <link>http://www.phpdeveloper.org/news/9741</link>
      <description><![CDATA[<p>
<i>Micheal Kimsal</i> has <a href="http://michaelkimsal.com/blog/?p=478">pointed out</a> another "bugbear" he's found in his work with PHP - this time it's with the use of class constants.
</p>
<blockquote>
My issue is not with the language itself (this time!) but how this sort of documentation is handled. Updating public documentation well ahead of a release creates confusion.
</blockquote>
<p>
He's referring to the documentation for the class constants not quite matching up with the current functionality (resulting in a T_PAAMAYIM_NEKUDOTAYIM). He wants consistency in the documentation and maybe references to what it requires to use a certain bit of code. 
</p>]]></description>
      <pubDate>Wed, 05 Mar 2008 19:08:00 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Antony Dovgal's Blog: 5.3 snapshots are available]]></title>
      <guid>http://www.phpdeveloper.org/news/9718</guid>
      <link>http://www.phpdeveloper.org/news/9718</link>
      <description><![CDATA[<p>
<i>Antony Dovgal</i> <a href="http://daylessday.org/archives/14-5_3-snapshots-are-available.html">points out</a> that <i>Derick Rethans</i> has added the snapshots for PHP 5.3 to the <a href="http://snaps.php.net/">snaps.php.net</a> website.
</p>
<blockquote>
Short list of what you can find there: Namespaces, __callstatic() magic method, accessing static members through $foo::myFunc(), fully rewritten ini-parser with .htaccess-like user defined ini files for CGI/FastCGI, improved OpenSSL extension, PCRE 7.4, and other fixes and improvements that will never get into 5_2 branch.
</blockquote>
<p>
He recommends <a href="http://daylessday.org/archives/14-5_3-snapshots-are-available.html">teching throughly</a> before the major release to find all of the bug before the general public does. Builds for both <a href="http://snaps.php.net/php5.3-200802281130.tar.gz">source</a> and <a href="http://snaps.php.net/win32/php5.3-win32-200802201330.zip">Windows</a> systems have been posted.
</p>]]></description>
      <pubDate>Thu, 28 Feb 2008 09:33:00 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Brian Moon's Blog: Apache Worker and PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/9641</guid>
      <link>http://www.phpdeveloper.org/news/9641</link>
      <description><![CDATA[<p>
In a <a href="http://doughboy.wordpress.com/2008/02/13/apache-worker-and-php/">recent post</a> to his blog, <i>Brian Moon</i> talks about the experience he's had with using PHP on Apache 2 with a <a href="http://www.php.net/manual/en/faq.installation.php#faq.installation.apache2">threaded MPM</a> at Dealnews.com.
</p>
<blockquote>
Well, first, what is an MPM? It stands for Multi-Processing Module. [...] The most commonly used threaded MPM is the Worker MPM. In this MPM, you have several processes that run multiple threads within it. This is the one I will be talking about.
</blockquote>
<p>
He <a href="http://doughboy.wordpress.com/2008/02/13/apache-worker-and-php/">goes on</a> to describe the "huge memory savings" that using the module got them - using the worker process to increase the child capacity of the Apache instance. He recommends keeping it simple when compiling a server to work with the worker functionality and mentions  how it can also help with serving static pages right along side the dynamic ones (without a second server!).
</p>
<p>
Check out <a href="http://doughboy.wordpress.com/2008/02/13/apache-worker-and-php/">the post</a> for a few more tips.
</p>]]></description>
      <pubDate>Fri, 15 Feb 2008 08:43:00 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[SitePoint PHP Blog: What's so bad about the Singleton?]]></title>
      <guid>http://www.phpdeveloper.org/news/9624</guid>
      <link>http://www.phpdeveloper.org/news/9624</link>
      <description><![CDATA[<p>
On the SitePoint PHP Blog today <i>Troels Knak-Nielsen</i> asks th3e question "what's so bad about the singleton?" For all of its advantages, is there a darker side of the design pattern when it pertains to global variables.
</p>
<blockquote>
As I have often taken this stance myself, I found it reasonable that I should be able to argue for it, so I'll try to give an explanation. This is also in part a follow-up on <a href="http://www.sitepoint.com/blogs/2008/02/04/dealing-with-dependencies/">my post from last week</a>, in which I present a way to avoid global symbols, without spending much time on why.
</blockquote>
<p>
He <a href="http://www.sitepoint.com/blogs/2008/02/13/whats-so-bad-about-the-singleton/">talks about</a> what they are and how they're commonly used - sometimes with some unpleasant side effects because of their use of globals.
</p>]]></description>
      <pubDate>Wed, 13 Feb 2008 12:13:00 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[C7Y: Late Static Binding: a practical example]]></title>
      <guid>http://www.phpdeveloper.org/news/9617</guid>
      <link>http://www.phpdeveloper.org/news/9617</link>
      <description><![CDATA[<p>
<i>Sean Coates</i> has <a href="http://c7y.phparch.com/c/entry/1/art,late_static_bindings">posted a new article</a> today about one of the features that will be included in the next major release of PHP (5.3) - late static bindings.
</p>
<blockquote>
Late Static Binding (LSB) is a topic that's been brought up numerous times in the past three years in various PHP development discussion circles (and we're finally getting it in PHP 5.3)â€"but what does it really do, and why should you care? Here's a simple practical example of how it can greatly simplify your code's design.
</blockquote>
<p>
He <a href="http://c7y.phparch.com/c/entry/1/art,late_static_bindings">shows its usefulness</a> in an example of how it works, letting classes/objects access static methods, constants and properties of inherited classes (besides their own). His example (using beer, of course) shows how an extended class (Ale) can reference the constant (NAME) in the parent class (Beer). Thanks to a new keyword in PHP 5.3 - "static::" - helps define the difference even clearer.
</p>
<p>
Check out <a href="http://c7y.phparch.com/c/entry/1/art,late_static_bindings/1">the rest</a> of the article for a more practical usage too.
</p>]]></description>
      <pubDate>Tue, 12 Feb 2008 15:52:36 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Jonathan Snook's Blog: Easier Static Pages for CakePHP 1.2]]></title>
      <guid>http://www.phpdeveloper.org/news/9567</guid>
      <link>http://www.phpdeveloper.org/news/9567</link>
      <description><![CDATA[<p>
<i>Jonathan Snook</i> has <a href="http://snook.ca/archives/cakephp/static_pages_cakephp12/">posted about</a> a method he's using to make the creation/use of static pages in a CakePHP application (or website) simpler.
</p>
<blockquote>
Traditionally in a CakePHP application, to do static pages you have two options: use the built-in Pages controller or set up an empty action in a controller.
</blockquote>
<p>
Feeling that neither of these two options met how he wanted things to work, <i>Jonathan</i> (and <a href="http://cake.insertdesignhere.com/">Nate Abele</a>) developed a class that extends the error handler in the CakePHP framework to handle "missing" actions and controllers. This means that, if an unknown controller/action combo is called, this script will check in its correct location (in the structure of the site) and try to find it to render it.
</p>]]></description>
      <pubDate>Tue, 05 Feb 2008 08:44:00 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Joshua Thompson's Blog: Return to Prototype Based Programming in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/8947</guid>
      <link>http://www.phpdeveloper.org/news/8947</link>
      <description><![CDATA[<p>
Taking full advantage of the upcoming features in the PHP 5.3.x series (and in PHP6 for that matter), <i>Joshua Thompson</i> has <a href="http://personal.schmalls.com/2007/10/29/return-to-prototype-based-programming-in-php/">come up with a way</a> to accomplish some prototype-based programming in a PHP application:
</p>
<blockquote>
With the implementation of the get_called_class() function in PHP, prototype based programming in PHP is possible. The new function is in both PHP5.3 and PHP6 <a href="http://snaps.php.net/">snapshots</a>. So, I went back to the drawing board and came up with a fully capable class. The $this keyword is usable, as well as being able to use the self, parent, and static (new with the <a href="http://www.ds-o.com/archives/65-Late-static-binding....sorta.html">late static binding patch</a>) keywords. 
</blockquote>
<p>
<a href="http://en.wikipedia.org/wiki/Prototype-based_programming">Prototype-based programming</a> is (basically) a method where classes aren't prebuilt. Instead they are created on the fly based on other objects and interfaces. <i>Joshua</i>'s <a href="http://personal.schmalls.com/2007/10/29/return-to-prototype-based-programming-in-php/">post</a> is a huge code dump of a prototype class and an example of it in use, dynamically creating two methods and making the three objects available.
</p>]]></description>
      <pubDate>Wed, 31 Oct 2007 16:38:00 -0500</pubDate>
    </item>
  </channel>
</rss>
