<?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, 20 Nov 2008 04:20:32 -0600</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[DevShed: Validating Incoming Data by Using Polymorphism with Objects in PHP 5]]></title>
      <guid>http://www.phpdeveloper.org/news/7571</guid>
      <link>http://www.phpdeveloper.org/news/7571</link>
      <description><![CDATA[<p>
DevShed has <a href="http://www.devshed.com/c/a/PHP/Validating-Incoming-Data-by-Using-Polymorphism-with-Objects-in-PHP-5/">posted the final part</a> of their look at using polymorphism with objects in PHP5, this time with a focus on validating incoming data from a form.
</p>
<blockquote>
In this final installment of the series I'm going to show you how to develop an expandable PHP mechanism for validating different types of incoming data. This will demonstrate how this important pillar of object-oriented programming can be used with a plethora of applications.
</blockquote>
<p>
They <a href="http://www.devshed.com/c/a/PHP/Validating-Incoming-Data-by-Using-Polymorphism-with-Objects-in-PHP-5/1/">show how</a> to create a simple DataValidator class to act as a base to build from. On top of this, they create classes to validate if the value is:
<ul>
<li>empty
<li>an integer
<li>if it's numeric
<li>if it's in a certain range
<li>if it's alphanumeric
<li>if it's alphabetic
<li>or if it's a valid email address
</ul>
They also include how to implement these filters, showing a simple Factory pattern that creates the object and runs the value through its validation.
</p>]]></description>
      <pubDate>Thu, 05 Apr 2007 10:56:00 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[DevShed: Building Dynamic Web Pages with Polymorphism in PHP 5]]></title>
      <guid>http://www.phpdeveloper.org/news/7522</guid>
      <link>http://www.phpdeveloper.org/news/7522</link>
      <description><![CDATA[<p>
DevShed <a href="http://www.devshed.com/c/a/PHP/Building-Dynamic-Web-Pages-with-Polymorphism-in-PHP-5/">continues their look</a> at using polymorphism in an application with the latest part of the series - "Building Dynamic Web Pages with Polymorphism in PHP 5".
</p>
<blockquote>
In short, Polymorphism is a feature exposed by certain objects that belong to the same family, which eventually can behave differently, even when they're using identical methods. Or more clearly, an object can be considered polymorphic when it's capable of performing different actions by utilizing the same method.
</blockquote>
<p>
<a href="http://www.devshed.com/c/a/PHP/Building-Dynamic-Web-Pages-with-Polymorphism-in-PHP-5/">This time</a> they focus on web page development that uses this object-oriented practice. The create a WebPageElement that you can ID and class attributes on and use it to create HTML widgets and extend them to create Div and Link element.
</p>]]></description>
      <pubDate>Wed, 28 Mar 2007 18:15:35 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[DevShed: Abstracting Database Access Using Polymorphism with Objects in PHP 5]]></title>
      <guid>http://www.phpdeveloper.org/news/7476</guid>
      <link>http://www.phpdeveloper.org/news/7476</link>
      <description><![CDATA[<p>
In a <a href="http://www.devshed.com/c/a/PHP/Abstracting-Database-Access-Using-Polymorphism-with-Objects-in-PHP-5/">new article</a> from DevShed, they walk you through a method of using abstraction and objects along with polymorphism to work with databases.
</p>
<blockquote>
I'll be explaining how to implement Polymorphism to achieve a high level of abstraction when accessing different database systems. Subsequent articles will cover the use of polymorphic objects to build dynamic web documents and validate user-supplied input.
</blockquote>
<p>
They <a href="http://www.devshed.com/c/a/PHP/Abstracting-Database-Access-Using-Polymorphism-with-Objects-in-PHP-5/1/">start out</a> with a bad example of a database link in a PHP script, a database handler that, based on what type of database you tell it you're using, handles the requests appropriately. This is good, but poor design - their alternative is using objects (created from classes of one type for each kind of database). These are pulled together in a factory class and the correct one is built - out into a generic database object that's smart enough to know what it's supposed to do.
</p>]]></description>
      <pubDate>Wed, 21 Mar 2007 15:21:00 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[DevShed: Polymorphism, Design Patterns, and PHP Programming]]></title>
      <guid>http://www.phpdeveloper.org/news/6431</guid>
      <link>http://www.phpdeveloper.org/news/6431</link>
      <description><![CDATA[<p>
DevShed is continuing on with their series looking at advanced concepts of object oriented PHP with <a href="http://www.devshed.com/c/a/PHP/Polymorphism-Design-Patterns-and-PHP-Programming/">this new tutorial</a>. It's part three of four parts, looking this time at polymorphism and design patterns in PHP.
</p>
<blockquote>
Last week, we continued our discussion of the object-oriented features of PHP 5 by taking a first look at design patterns. This week, we will continue looking at design patterns, and examine polymorphism. This article, the third of four parts, is excerpted from chapter two of the book Advanced PHP Programming, written by George Schlossnagle.
</blockquote>
<p>
They <a href="http://www.devshed.com/c/a/PHP/Polymorphism-Design-Patterns-and-PHP-Programming/">cover</a> some of the more handy features OOP in PHP5, including interfaces, type hinting, the factory pattern and the singleton pattern. 
</p>]]></description>
      <pubDate>Thu, 05 Oct 2006 10:32:00 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Nefarious Designs: Object-Oriented PHP Part 3: Taking Relationships Further]]></title>
      <guid>http://www.phpdeveloper.org/news/6111</guid>
      <link>http://www.phpdeveloper.org/news/6111</link>
      <description><![CDATA[<p>
Nefarious Designs has posted <a href="http://nefariousdesigns.co.uk/archive/2006/08/object-oriented-php-part-3-taking-relationships-further/">the next part</a> of their "Object-Oriented PHP" series today, the third part looking at how to take the relationships (discussed in <a href="http://www.phpdeveloper.org/news/6100">part two</a>) even further.
</p>
<blockquote>
In "<a href="http://nefariousdesigns.co.uk/archive/2006/08/object-oriented-php-part-1-definition/">Part 1: Definition</a>" we took a look at defining objects and classes in PHP. In "<a href="http://nefariousdesigns.co.uk/archive/2006/08/object-oriented-php-part-2-relationships/">Part 2: Relationships</a>" we looked at linking our objects and classes together. In part 3 I'm going to add to those relationships by looking at visibility, polymorphism and the scope resolution operator.
</blockquote>
<p>
He <a href="http://nefariousdesigns.co.uk/archive/2006/08/object-oriented-php-part-3-taking-relationships-further/">starts off with</a> a look at access modifiers (private, public, protected) on both attributes and methods. Next is a look at polymorphism with an example of using a getHTML function in both a base formElement class and the child class of textarea. He then talks about the scope resolution operator (::) and its use in parent/child relationships and in PHP5's scope.
</p>]]></description>
      <pubDate>Wed, 23 Aug 2006 06:33:31 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[DevShed: Using Inheritance, Polymorphism and Serialization with PHP Classes]]></title>
      <guid>http://www.phpdeveloper.org/news/6043</guid>
      <link>http://www.phpdeveloper.org/news/6043</link>
      <description><![CDATA[<p>
Some concepts of object-oriented design are harder to figure out that others for a budding programmer. Thankfully, there's articles <a href="http://www.devshed.com/c/a/PHP/Using-Inheritance-Polymorphism-and-Serialization-with-PHP-Classes/">like this one</a> from DevShed to help fill in some of the gaps. Specifically, they focus on inheritance, polymorphism, and serialization in your PHP classes.
</p>
<blockquote>
If you are working with classes in PHP, you will sooner or later encounter inheritance, polymorphism, and serialization. The ability to use these three will help speed up your code writing. This article covers how to use them, and more.
</blockquote>
<p>
First off, <a href="http://www.devshed.com/c/a/PHP/Using-Inheritance-Polymorphism-and-Serialization-with-PHP-Classes/">they look at</a> inheritance and working with child classes before moving on to polymorphism (similar functionality, different objects), calling functions statically, and serializing objects to make passing them around much easier.
</p>]]></description>
      <pubDate>Tue, 15 Aug 2006 09:02:43 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[DevShed: PHP 5 and Polymorphism]]></title>
      <guid>http://www.phpdeveloper.org/news/4946</guid>
      <link>http://www.phpdeveloper.org/news/4946</link>
      <description><![CDATA[From DevShed, there's <a href="http://www.devshed.com/c/a/PHP/PHP-5-and-Polymorphism/">a more advanced tutorial</a> that might interest PHP developers out there looking for more info on "polymorphism" for their apps.
<p>
<quote>
<i>
This article explains what polymorphism is and how it applies to object oriented design in particular. It also explains the pros and cons of polymorphism when working with certain versions of PHP.
</i>
</quote>
<p>
They <a href="http://www.devshed.com/c/a/PHP/PHP-5-and-Polymorphism/">start with a definition</a> on the topic that doesn't seem to help much: "The occurrence of different forms, stages, or types in individual organisms or in organisms of the same species, independent of sexual variations." They do, however, follow that with what it means to programming: "...an interface or base class without regard to an object's concrete class." They also include a simple example (no code, that's later).
<p>
With that concept in place, they move to the next step - working with the example to create code that can be used as a reference point. They talk about using a switch to make the script respond differently to different inputs and the lack of "late binding" support in PHP5.]]></description>
      <pubDate>Tue, 07 Mar 2006 07:19:08 -0600</pubDate>
    </item>
  </channel>
</rss>
