<?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 14:14:42 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Freek Lijten's Blog: SOLID - The S is for Single responsibility]]></title>
      <guid>http://www.phpdeveloper.org/news/17723</guid>
      <link>http://www.phpdeveloper.org/news/17723</link>
      <description><![CDATA[<p>
<i>Freek Lijten</i> has <a href="http://www.freeklijten.nl/home/2012/03/23/SOLID-The-S-is-for-Single-responsibility">written up a new post</a> to his blog about a set of development principles that have been getting more press in the PHP community lately - <a href="http://en.wikipedia.org/wiki/SOLID">SOLID</a>. In his post he starts with a look at the "S" in the set - "Single Responsibility".
</p>
<blockquote>
The single responsibility principle isn't all that hard to explain. It states that an object should do one thing, and one thing only. [...]  A responsibility is a reason to change, and a class should only have one of those. Now all of this may sound abstract and since the objective of this series is to avoid just that we'll just dive into the why now.
</blockquote>
<p>
He includes some sample code to illustrate, going with an active record implementation, some of the problems that come with a typical setup including issues with unit testing, bad practice of using the data store directly, etc. He shows a refactored code example that splits out the functionality previously all in the one class ("Bike") into three different ones - one is the normal Bike object, another compares the Bikes and the third works with the data store to handle the <a href="http://en.wikipedia.org/wiki/Create,_read,_update_and_delete">CRUD</a> for the objects.
</p>]]></description>
      <pubDate>Fri, 23 Mar 2012 11:23:59 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Working Software Blog: Escaping single and double quotes for use with XPath queries in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/16746</guid>
      <link>http://www.phpdeveloper.org/news/16746</link>
      <description><![CDATA[<p>
On the Working Software blog there's a new post showing a solution to a issue with <a href="http://www.workingsoftware.com.au/page/Escaping_single_and_double_quotes_in_XPath_queries_in_PHP">escaping quotes in XPath queries</a> that's not just an issue in PHP.
</p>
<blockquote>
I've been working with the Basecamp API to plugin our IRC bot that we use for time tracking and I'm astounded to learn that escaping single and/or double quotes for XPath queries in PHP does not have a well documented, best practices solution. In fact, it seems as though this is not peculiar to PHP. I took a look around and found this excellent article by "Kushal": <a href="http://kushalm.com/the-perils-of-xpath-expressions-specifically-escaping-quotes">http://kushalm.com/the-perils-of-xpath-expressions-specifically-escaping-quotes</a>.
</blockquote>
<p>
He's put together <a href="https://gist.github.com/1155973">his own (PHP) solution</a> to the problem - running the entire XPath query through a filtering method that splits it up, replaces the quote characters and combines it back down to a single string.
</p>]]></description>
      <pubDate>Fri, 19 Aug 2011 13:50:14 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Lullabot.com: Single Sign-on across Sub-Domains in Drupal with No Extra Modules]]></title>
      <guid>http://www.phpdeveloper.org/news/14122</guid>
      <link>http://www.phpdeveloper.org/news/14122</link>
      <description><![CDATA[<p>
On the Lullabot.com blog there's a recent post from <i>Nate Haug</i> showing how you can <a href="http://www.lullabot.com/articles/drupal-single-sign-across-sub-domains">set up a single sign on with Drupal</a> even if your user crosses multiple sub-domains on your site. The technique is particularly handy in that it doesn't require any extra modules to be installed to make it work.
</p>
<blockquote>
With the multitude of single sign-on modules out there for Drupal, it's easy to miss the fact that Drupal has a built-in single sign on mechanism already. No modules, no configuration, just 20 easy lines of PHP in your site's settings.php file. This solution works for a lot of clients, but the set of requirements is pretty specific as to when you can use this approach.
</blockquote>
<p>
To make it work all sites must be on the same domain (just sub-domains of it), be using MySQL as your backend database and, if you're using clustered hardware, they need to be on the same cluster to be able to make the cross-database queries. Since Drupal can prefix tables so the settings for each site are split out, you can create a "shared table" by making a few changes in your master and slave configuration.
</p>]]></description>
      <pubDate>Wed, 03 Mar 2010 11:06:57 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Arnold Daniels' Blog: Simple Single Sign-On for PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/12371</guid>
      <link>http://www.phpdeveloper.org/news/12371</link>
      <description><![CDATA[<p>
<i>Arnold Daniels</i> has a new post to his blog today dealing with something (usually companies) are looking towards to help deal with the infamous "too many passwords for too many places" issue - a <a href="http://blog.adaniels.nl/articles/simple-single-sign-on-for-php/">simple single sign-on tool</a> that can be dropped in an used anywhere.
</p>
<blockquote>
Associated websites often share user information, so a visitor only has to register once and can use that username and password for all sites. A good example for this is Google. [...] There are many single sign-on applications and protocols. Most of these are fairly complex. [...] I've written a simple single sign-on solution (400 lines of code), which works by linking sessions. This solutions works for normal websites as well as AJAX sites.
</blockquote>
<p>
He compares the flow on a non-single sign-on <a href="http://blog.adaniels.nl/wp-content/uploads/sso-diagram_no-sso.png">site</a> (lots of fetching between the client/server) and the <a href="http://blog.adaniels.nl/wp-content/uploads/sso-diagram_alex.png">first</a>/<a href="http://blog.adaniels.nl/wp-content/uploads/sso-diagram_binck.png">following</a> visits with his tool in place. You can <a href="http://blog.adaniels.nl/downloads/SSO.zip">download the source here</a> (as well as the <a href="http://blog.adaniels.nl/downloads/SSO.ajax-broker.zip">Ajax broker</a>).
</p>]]></description>
      <pubDate>Mon, 20 Apr 2009 09:36:35 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Raphael Stolt's Blog: Zend Framework coding standards on one page]]></title>
      <guid>http://www.phpdeveloper.org/news/9610</guid>
      <link>http://www.phpdeveloper.org/news/9610</link>
      <description><![CDATA[<p>
<i>Raphael Stolt</i>, in working on his component for the Zend Framework (based on the <a href="http://pear.php.net/package/PHP_CodeSniffer">PHP_CodeSniffer</a> PEAR package), pulled together all of the information Zend provides about their coding standards into one place.
</p>
<blockquote>
Before jumping into the development of a Zend Framework coding standard for the <a href="http://pear.php.net/package/PHP_CodeSniffer">PHP_CodeSniffer</a> Pear package, I spent some time revisiting and compiling the available Zend Framework <a href="http://framework.zend.com/manual/en/coding-standard.html">coding standards</a> into a handy one-paged Pdf document.
</blockquote>
<p>
You can <a href="http://raphael.stolt.googlepages.com/ZendFramework_coding_standards_on_on.pdf">download the file here</a> or, if you want something a bit more "spread out", check out <a href="http://framework.zend.com/manual/en/coding-standard.html">the coding standards</a> on the Zend Framework website.
</p>]]></description>
      <pubDate>Tue, 12 Feb 2008 07:59:00 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[php|architect: Stuff your stockings: single issues 30% off]]></title>
      <guid>http://www.phpdeveloper.org/news/9300</guid>
      <link>http://www.phpdeveloper.org/news/9300</link>
      <description><![CDATA[<p>
The mystery has been relealed - the <a href="http://www.phparch.com">php|architect</a> folks have <a href="http://www.phparch.com/c/news/view/20071221-special_issue_price.src">posted about their secret</a> today - a discount on single issues of 30%.
</p>
<blockquote>
Seasons greetings everyone! The first of two surprises from us today is a great opportunity to combine our recent drop of all DRM protection on our PDFs with an awesome 30% discount on our single-issue prices to stock up on all your favourite past issues of php|architect.
</blockquote>
<p>
This means that single issues are priced at (about) $3.49 CAD for a few days - all you need to do is pick your favorites from <a href="http://www.phparch.com/c/magazine/archive">their archive</a>, even their <a href="http://www.phparch.com/c/magazine/issue/63">most recent issue</a>.
</p>]]></description>
      <pubDate>Fri, 21 Dec 2007 13:47:00 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Alex Netkachov's Blog: Jamp! is Updated]]></title>
      <guid>http://www.phpdeveloper.org/news/9108</guid>
      <link>http://www.phpdeveloper.org/news/9108</link>
      <description><![CDATA[<p>
<i>Alex Netkachov</i> has <a href="http://www.alexatnet.com/node/106">posted about the update</a> he's just released to the <a href="http://www.alexatnet.com/node/47">Jamp!</a> package.
</p>
<blockquote>
I've updated the Jamp! All packages are updated to the latests stable version available, the "Server" and "Service" commands are added for Tomcat 6.0, Jamp.hta UI is updated
</blockquote>
<p>
<a href="http://www.alexatnet.com/node/47">Jamp!</a> is a single-click installer for PHP/Java/Apache/MySQL to make installing them (and getting them working together) simple.
</p>]]></description>
      <pubDate>Fri, 23 Nov 2007 14:08:00 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[DevShed: Working with Strings and the Composite Pattern in PHP 5]]></title>
      <guid>http://www.phpdeveloper.org/news/7431</guid>
      <link>http://www.phpdeveloper.org/news/7431</link>
      <description><![CDATA[<p>
DevShed has posted <a href="http://www.devshed.com/c/a/PHP/Working-with-Strings-and-the-Composite-Pattern-in-PHP-5/">the second and last part</a> of a series of two articles based around the Composite design pattern - using it to work with strings in PHP5.
</p>
<blockquote>
Are you a PHP developer who wants to improve your skills in pattern-based programming in PHP? If the answer to this question is a emphatic yes, then you should begin reading this article now! Welcome to the final part of the series "Implementing the composite pattern with PHP 5." Comprised of two instructive tutorials, this series walks you through the basic concepts of this important design pattern, and shows you how to apply it with some educational examples.
</blockquote>
<p>
They <a href="http://www.devshed.com/c/a/PHP/Working-with-Strings-and-the-Composite-Pattern-in-PHP-5/1/">start by defining</a> a simple StringProcessor class as an abstract interface to build from. From there, they create two other classes - the SingleStringProcessor and the MultipleStringProcessor. Each of these takes in either a single file or multiple filenames and spits back out the value of the string and the length of the string.
</p>]]></description>
      <pubDate>Wed, 14 Mar 2007 11:14:00 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[DevShed: Introducing the Composite Pattern in PHP 5]]></title>
      <guid>http://www.phpdeveloper.org/news/7413</guid>
      <link>http://www.phpdeveloper.org/news/7413</link>
      <description><![CDATA[<p>
Continuing their look at design patterns, DevShed has <a href="http://www.devshed.com/c/a/PHP/Introducing-the-Composite-Pattern-in-PHP-5/">kicked off</a> yet another series today spotlighting the Composite pattern as used in PHP5.
</p>
<blockquote>
The composite pattern is one of the less commonly used patterns in PHP 5. Nevertheless, in certain situations, it is very helpful. This article, the first one in a two-part series, will introduce you to the basic concepts of the composite pattern.
</blockquote>
<p>
The composite pattern allows you to define a single or multiple objects that will have identical behavior - basically behaving the same if there's just one or with the multiple instances. They <a href="http://www.devshed.com/c/a/PHP/Introducing-the-Composite-Pattern-in-PHP-5/1/">start with the basics</a>, reaching for one of their standard examples - a file information reader - to illustrate their point. They create the two helper classes it needs to work, one for the single file read and another for the multiple file read. The finish by combining them all together for a file-reading fiesta, showing how to get a one shot info dose as well adding files to the list and grabbing their info all together.
</p>]]></description>
      <pubDate>Fri, 09 Mar 2007 09:33:00 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Pierre-Alain Joye's Blog: Howto use a single php.ini for cli/cgi with htscanner, use 0.7.0 or later]]></title>
      <guid>http://www.phpdeveloper.org/news/7300</guid>
      <link>http://www.phpdeveloper.org/news/7300</link>
      <description><![CDATA[<p>
<i>Pierre-Alain Joye</i> has <a href="http://blog.thepimp.net/index.php/post/2007/02/19/Howto-use-a-single-phpini-for-cli-or-cgi-with-htscanner-use-070-or-later-%3A">posted a quick hit</a> to his blog today about using one php.ini file for both a cli and cgi installation of PHP without it throwing errors for <a href="http://pecl.php.net/htscanner">htscanner</a>.
</p>
<blockquote>
Htscanner reports error during module or request init (returns FAILURE), these errors may be fatal and stop the current executions. This behavior is not desired if you use it in a shell ((if you have only one system php.ini for both cli and cgi or if htscanner is compiled statically). This release brings a new ini settings to solve this problem, stop_on_error.
</blockquote>
<p>
The <a href="http://blog.thepimp.net/index.php/post/2007/02/19/Howto-use-a-single-phpini-for-cli-or-cgi-with-htscanner-use-070-or-later-%3A">solution</a> involves changing the htscanner setting to 0 instead of 1 to return a "SUCCESS" message rather than the errors.
</p>]]></description>
      <pubDate>Mon, 19 Feb 2007 08:58:00 -0600</pubDate>
    </item>
  </channel>
</rss>

