<?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, 08 Jan 2009 03:21:32 -0600</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Travis Swicegood's Blog: Why Inheritance Sucks]]></title>
      <guid>http://www.phpdeveloper.org/news/8826</guid>
      <link>http://www.phpdeveloper.org/news/8826</link>
      <description><![CDATA[<p>
<i>Travis Swicegood</i> has made two <a href="http://www.travisswicegood.com/index.php/2007/10/11/why_class_inheritance_sucks">blog</a> <a href="http://www.travisswicegood.com/index.php/2007/10/11/title_12">posts</a> about his agreement with other statements made about why class inheritance sucks.
</p>
<p>
From the <a href="http://www.berniecode.com/writing/inheritance/">original comments</a> made by <i>Bernard Sumption</i>:
</p>
<blockquote>
All of the pain caused by inheritance can be traced back to the fact that inheritance forces 'is-a' rather than 'has-a' relationships. If class R2Unit extends Droid, then a R2Unit is-a Droid. If class Jedi contains an instance variable of type Lightsabre, then a Jedi has-a Lightsabre.
</blockquote>
<p>
<i>Travis</i> <a href="http://www.travisswicegood.com/index.php/2007/10/11/why_class_inheritance_sucks">agrees</a> and then comes back with his <a href="http://www.travisswicegood.com/index.php/2007/10/11/title_12">second post</a> to clarify something - composition versus inheritance:
</p>
<blockquote>
I approach OOP from a flexibility standpoint with one of its biggest flex-points being loose coupling which in turn promotes reusability. I'm going to use Event as a hypothetical example.
</blockquote>
<p>
He uses Events and design pattern illustrations (like the Visitor and Observer) to help illustrate his point.
</p>]]></description>
      <pubDate>Fri, 12 Oct 2007 10:11:00 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[DevShed: Using the Observer Design Pattern with Static Data in PHP 5]]></title>
      <guid>http://www.phpdeveloper.org/news/8665</guid>
      <link>http://www.phpdeveloper.org/news/8665</link>
      <description><![CDATA[<p>
DevShed continues their look at handling static data in a dynamic application with <a href="http://www.devshed.com/c/a/PHP/Using-the-Observer-Design-Pattern-with-Static-Data-in-PHP-5/">the final part</a> of the series - using the observer design pattern to handle the insertion of the static information.
</p>
<blockquote>
I'll show you how to use a static property, along with the programmatic model dictated by the observer pattern, to implement an expandable data validation system. This task might have an immediate application in a real situation.
</blockquote>
<p>
They show how to <a href="http://www.devshed.com/c/a/PHP/Using-the-Observer-Design-Pattern-with-Static-Data-in-PHP-5/1/">handle user information</a> (as defined as properties in the creation of the user objects) and pushing that data back out into the page. The observer pattern comes into play when they go to validate the user information checking to see if it's all alphabetical, numeric or an email address. 
</p>]]></description>
      <pubDate>Mon, 17 Sep 2007 12:01:00 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Peter Goodman's Blog: Observers and Dispatchers]]></title>
      <guid>http://www.phpdeveloper.org/news/6142</guid>
      <link>http://www.phpdeveloper.org/news/6142</link>
      <description><![CDATA[<p>
As <a href="http://devzone.zend.com/node/view/id/862">pointed out</a> by <i>Cal Evans</i> on the Zend Developer Zone, there's <a href="http://www.flyingwithfire.com/2006/08/24/observers-and-dispatchers/">a new look</a> at Observers and Dispatchers over on <i>Peter Goodman</i>'s blog.
</p> 
<blockquote>
Maybe you've used a framework that uses Observers and Dispatchers, or you've heard of them but don't know how they work. Well, I'm going to explain them and tell you why they're so useful.
</blockquote>
<p>
He <a href="http://www.flyingwithfire.com/2006/08/24/observers-and-dispatchers/">starts with a table defining the parts</a> of this dynamic duo before jumping into the code examples and explainations. His first example is just a basic use of the pattern, while the second involves using a MySQL table for the notification events.
</p>]]></description>
      <pubDate>Fri, 25 Aug 2006 08:30:37 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[DevShed: Centralizing the Validation of Data with the Observer Pattern in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/5914</guid>
      <link>http://www.phpdeveloper.org/news/5914</link>
      <description><![CDATA[<p>
DevShed wraps up its look at the Observer pattern in PHP with <a href="http://www.devshed.com/c/a/PHP/Centralizing-the-Validation-of-Data-with-the-Observer-Pattern-in-PHP/">this last part</a> of the series - centralizing the data validation of your PHP5 application using the Observer pattern.
</p>
<blockquote>
Well, over the course of this last tutorial, I'll be moving the application of observer objects toward the real world, in this case by showing you how to include these objects within a set of form-validation classes. After reading this article, you should be equipped with a decent knowledge of how a form checking application can use the powerful features of this widely-known design pattern.
</blockquote>
<p>
They <a href="http://www.devshed.com/c/a/PHP/Centralizing-the-Validation-of-Data-with-the-Observer-Pattern-in-PHP/">look back first</a> at the code for the form validation class from the <a href="http://www.phpdeveloper.org/news/5856">previous article</a> before moving on and building in more functionality - a FormObserver class. Finally, they pair the two classes to make a working, validating example.
</p>]]></description>
      <pubDate>Mon, 31 Jul 2006 09:15:19 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Diniki.net: PHP Design Patterns]]></title>
      <guid>http://www.phpdeveloper.org/news/5866</guid>
      <link>http://www.phpdeveloper.org/news/5866</link>
      <description><![CDATA[<p>
Patterns in PHP are becoming more and more popular, and sites like <a href=" http://dikini.net/php_design_patterns">this one</a> are doing well to provide summaries of each with code examples to help clarify.
</p>
<blockquote>
<p>
Following my petty wingeing about the design patterns in php on the web I have to bite the bullet and do something about it. So here it comes a collection of design pattern examples, some from the GOF book, some collected from around the net, some (maybe) I have discovered.
</p>
<p>
The intent of these pages is to show the shapes of the patterns not a fully fledged implementation. In real life probably a combination of patterns will be employed. Everyone has their own favourites following their political, religious and style differences.
</p>
</blockquote>
<p>
He <a href="http://dikini.net/php_design_patterns">admits that the pages</a> are a work in progress and aren't complete, but they're a start to share his studies with the world. His list of patterns so far includes:
<ul>
<li><a href="http://dikini.net/facade">Facade</a>
<li><a href="http://dikini.net/hooks">Hooks</a>
<li><a href="http://dikini.net/protocol_method">Protocol Method</a>
<li><a href="http://dikini.net/singleton">Singleton</a>
</ul>
with more to come. All of his examples under each pattern are written in PHP.
</p>]]></description>
      <pubDate>Tue, 25 Jul 2006 06:08:07 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[DevShed: Developing a Form Validation System with the Observer Pattern in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/5856</guid>
      <link>http://www.phpdeveloper.org/news/5856</link>
      <description><![CDATA[<p>
DevShed continues their look at the Observer pattern in PHP with <a href="http://www.devshed.com/c/a/PHP/Developing-a-Form-Validation-System-with-the-Observer-Pattern-in-PHP/">this new tutorial</a>, part two in the series - developing a form validation system with the Observer pattern.
</p>
<blockquote>
Well, after refreshing some of the most important points regarding the creation of observer objects, let's focus our attention on the subject of this second tutorial. Over the next few lines, I'll be demonstrating how to apply the Observer pattern during the development of a real-world application: a form validation system.
</blockquote>
<p>
They <a href="http://www.devshed.com/c/a/PHP/Developing-a-Form-Validation-System-with-the-Observer-Pattern-in-PHP/1/">start with </a> the creation of the validation classes for the different data formats. They follow it with the creation of a few more, a bit more abstract classes for validation. Finally, they tie it all in, using the Observer pattern to integrate the form data inputted and the routines to check their values.
</p>
]]></description>
      <pubDate>Mon, 24 Jul 2006 07:10:31 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[DevShed: An Introduction to the Observer Pattern in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/5808</guid>
      <link>http://www.phpdeveloper.org/news/5808</link>
      <description><![CDATA[<p>
DevShed is starting off a new series today with <a href="http://www.devshed.com/c/a/PHP/An-Introduction-to-the-Observer-Pattern-in-PHP/">the first part</a> of their look at design patterns, specifically this time, the Observer pattern.
</p>
<blockquote>
<p>
If you have reached the point in your programming life where you are using design patterns, you will want to read this article. The first of a three-part series, it covers the Observer pattern, which can be just the thing for situations where objects need to send information to a centralized mechanism.
</p>
<p>
I hope you'll be wondering how all this boring theory can be translated into functional PHP code. That's what I'm going to do in the course of this article, by introducing some friendly examples of how to implement the Observer pattern in PHP applications.
</p>
</blockquote>
<p>
They <a href="http://www.devshed.com/c/a/PHP/An-Introduction-to-the-Observer-Pattern-in-PHP/">just right in</a> and create a more practical example, opting for demonstration over a lot of explaination. Their sample code manipulates strings to change them to uppercase and save them off to a file. They attach a basic error logger to it and then conform it to fit in with the Observer pattern style.
</p>]]></description>
      <pubDate>Mon, 17 Jul 2006 13:48:34 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Robert Peake's Blog: Design Patterns Part II Is Out]]></title>
      <guid>http://www.phpdeveloper.org/news/4648</guid>
      <link>http://www.phpdeveloper.org/news/4648</link>
      <description><![CDATA[<i>Robert Peake</i> has a <a href="http://www.robertpeake.com/archives/137-Design-Patterns-Part-II-Is-Out.html">new note</a> today about how Part Two of his Design Patterns series has been published in the latest <a href="http://www.phpmag.net">PHP Magazine</a>.
<p>
<quote>
<i>
The <a href="http://www.php-mag.net/magphpde/psecom,id,20,archive,2,noeid,20,.html">latest issue</a> of PHP Magazine is now available. In it you will find part two of my <a href="http://www.robertpeake.com/archives/130-Introducing-Design-Patterns-Now-Available.html">series on design patterns in PHP</a>, along with a host of other great articles. Check it out!
</i>
</quote>
<p>
In <a href="http://www.php-mag.net/magphpde/psecom,id,20,archive,2,noeid,20,.html">this part of the series</a>, he covers the decorator, strategy, and observer patterns...]]></description>
      <pubDate>Thu, 12 Jan 2006 06:30:41 -0600</pubDate>
    </item>
  </channel>
</rss>
