<?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>Sun, 12 Feb 2012 20:53:37 -0600</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Dennis Hotson's Blog: PHP Object Oriented Programming Reinvented]]></title>
      <guid>http://www.phpdeveloper.org/news/15177</guid>
      <link>http://www.phpdeveloper.org/news/15177</link>
      <description><![CDATA[<p>
<i>Dennis Hotson</i> has a new post to his Tumblr blog about what he calls <a href="http://dhotson.tumblr.com/post/1167021666/php-object-oriented-programming-reinvented">PHP object-oriented programming reinvented</a> - a chunk of code he's created that lets you build classes out of objects.
</p>
<blockquote>
It's tentatively called "PHP Object Oriented Programming Reinvented". Although it turns out the acronym is kind of unfortunate. I'm still working on that... The main idea is that classes aren't really very special at all, they're just objects like everything else. They don't even have names.. you give your class a name by giving the variable it's assigned to a name.
</blockquote>
<p>
He includes a code snippet that shows the creation of a sample class (the "class" class) and extend it with a new class of "animal"....and then extend that with a class for a "dog". You can take a look at the full code for the method <a href="http://gist.github.com/591139">here</a>.
</p>]]></description>
      <pubDate>Thu, 23 Sep 2010 12:43:39 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Brandon Savage's Blog: 5 (Good) Lessons The Government Teaches Us About Object-Oriented Programming]]></title>
      <guid>http://www.phpdeveloper.org/news/13617</guid>
      <link>http://www.phpdeveloper.org/news/13617</link>
      <description><![CDATA[<p>
<i>Brandon Savage</i> has taken some of the good practices in object oriented application development and <a href="http://www.brandonsavage.net/five-good-lessons-the-government-teaches-us-about-object-oriented-programming/">related them</a> to some of the things that the government can teach you about them:
</p>
<blockquote>
However, the ubiquity of governments around the world also gives us a unique opportunity to learn some lessons from them as developers, particularly about principles of object oriented programming. Governments serve as perfet object lessons (pun intended), demonstrating some of the good, the bad, and the ugly object-oriented practices we see.
</blockquote>
<p>
He looks at five topics - abstraction, encapsulation, implementation of dumb objects, decoupling and the concept of "one class, one responsibility".
</p>]]></description>
      <pubDate>Wed, 02 Dec 2009 12:11:55 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Brandon Savage's Blog: Q&A: Answering Some Questions About Object-Oriented Programming]]></title>
      <guid>http://www.phpdeveloper.org/news/13457</guid>
      <link>http://www.phpdeveloper.org/news/13457</link>
      <description><![CDATA[<p>
<i>Brandon Savage</i> has <a href="http://www.brandonsavage.net/qa-answering-some-questions-about-object-oriented-programming/">posted the answers</a> to some questions that were raised by a <a href="http://www.brandonsavage.net/five-tips-to-make-good-object-oriented-code-better/">previous post</a> of his on object-oriented development and some best practices. In this new post, he answers the questions:
</p>
<ul>
<li>"Often times when a developer gives each object only one responsibility, they tightly couple objects together." Can you explain?
<li>I do not know about dependency injection '" do you have any links that do not require subscription?
<li>Can you please explain 'one object '" one job' concept?
</ul>
<p>
Each question is answered, sometimes with code included, to help resolve any confusion about how to correct use object oriented practices in your applications.
</p>]]></description>
      <pubDate>Fri, 30 Oct 2009 09:20:52 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Ibuildings Blog: Migrating a dev team to an OO team (Part 1)]]></title>
      <guid>http://www.phpdeveloper.org/news/13174</guid>
      <link>http://www.phpdeveloper.org/news/13174</link>
      <description><![CDATA[<p>
On the Ibuildings blog today <i>Dennis-Jan Broerse</i> has posted the <a href="http://www.ibuildings.com/blog/archives/1567-Migrating-a-dev-team-to-an-OO-team-Part-1.html">first part of a series</a> he's doing on moving a development team up into the world of object oriented programming.
</p>
<blockquote>
Being a trainer for Ibuildings, I noticed that the main topic of almost every course plan for customers is object oriented programming. So OO is popular and demand for it is rising. However, while PHP support for OO has been present for a couple of years still many companies that I visit are maintaining and developing procedural applications.
</blockquote>
<p>
He talks some about how he tries to promote the OOP way of doing things and defines one of the major hindrances for companies to try to move their development towards it - time. The next part of his series will look at ways to help with this. 
</p>]]></description>
      <pubDate>Mon, 07 Sep 2009 13:28:12 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Blue Parabola Blog: Objectively Oriented]]></title>
      <guid>http://www.phpdeveloper.org/news/11971</guid>
      <link>http://www.phpdeveloper.org/news/11971</link>
      <description><![CDATA[<p>
On the Blue Parabola blog, <i>Matthew Turland</i> <a href="http://blueparabola.com/blog/objectively-oriented">takes a look</a> at object-oriented programming and what core concepts lie at its heart.
</p>
<blockquote>
What is <a href="http://en.wikipedia.org/wiki/Object-oriented_programming">object-oriented programming</a>? The acronym OOP has become a bit of a buzzword in the <a href="http://en.wikipedia.org/wiki/History_of_programming_languages#The_1990s:_the_Internet_age">current age of programming</a>, to the point where the waters of its definition have become rather murky. [...] PHP <a href="http://michaelkimsal.com/blog/php-is-not-object-oriented/">may not be object-oriented</a>, but from a purist perspective, neither is Java. What do I mean by "purist perspective?" Plain and simple: everything is either an <a href="http://en.wikipedia.org/wiki/Object_(computing)#Objects_in_object-oriented_programming">object</a> or a <a href="http://en.wikipedia.org/wiki/Message_passing">message</a> being passed between objects (where message parameters are also objects). 
</blockquote>
<p>
He mentions one of the first languages to support objects (<a href="http://en.wikipedia.org/wiki/Simula">Simula</a>) and the four fundamental concepts that would make a language truly OOP - abstraction, inheritance, encapsulation, polymorphism. Its his opinion, though, that while its good for languages to adhere to these four principles as much as they can, discussions about how well they adhere to them is usually just "spinning your wheels" and don't have much use.
</p>]]></description>
      <pubDate>Wed, 18 Feb 2009 09:31:30 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Michael Kimsal's Blog: PHP is not object oriented!]]></title>
      <guid>http://www.phpdeveloper.org/news/11935</guid>
      <link>http://www.phpdeveloper.org/news/11935</link>
      <description><![CDATA[<p>
One complaint that <i>Michael Kimsal</i> has about the PHP language - <a href="http://michaelkimsal.com/blog/php-is-not-object-oriented/">"PHP is *not* object oriented"</a>:
</p>
<blockquote>
Goodness.  I like PHP.  I use it a lot.  I've been using it since early 1996.  I'm Zend Certified, have done billion dollar ecommerce projects in PHP, and like to think I know a little bit about PHP. It is *NOT* "object oriented".  I wish people would quit saying it.  Perhaps there's a need to impress non PHP people, or to try to get across the idea that PHP supports objects.  Maybe that's fair, but I don't think so.
</blockquote>
<p>
His <a href="http://michaelkimsal.com/blog/php-is-not-object-oriented/">reasoning</a> is that, despite the phrase "object oriented" being applied to PHP, its functionality does not hinge on objects. He suggests a "more correct" term to replace it - "object capable". This shows that PHP can use objects but, because of its procedural roots, doesn't have to.
</p>]]></description>
      <pubDate>Thu, 12 Feb 2009 08:44:10 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Community News: PHP 5.3beta1 Announced]]></title>
      <guid>http://www.phpdeveloper.org/news/11835</guid>
      <link>http://www.phpdeveloper.org/news/11835</link>
      <description><![CDATA[<p>
The first step towards a full, stable release of the next version of PHP - 5.3 - has <a href="http://news.php.net/php.internals/42876">officially been made</a> - the first beta (PHP 5.3beta1) has been released and is now available for download.
</p>
<blockquote>
The biggest change is dropping of OO functionality in closures as full
OO support for closures is planed for a later release than PHP 5.3.0.
See http://wiki.php.net/rfc/closures/removal-of-this. This release marks the begin of a feature freeze and bug fix only phase.
If in doubt whether your change is a bugfix please run it by Lukas and
me.
</blockquote>
<p>
You can download the packages here:
</p>
<ul>
<li><a href="http://downloads.php.net/johannes/php-5.3.0beta1.tar.bz2">tar.bz archive</a>
<li><a href="http://downloads.php.net/johannes/php-5.3.0beta1.tar.gz">tar.gz archive</a>
<li><a href="http://windows.php.net/qa/">Winodws builds</a>
</ul>]]></description>
      <pubDate>Thu, 29 Jan 2009 07:56:05 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[NETTUTS.com: Learning OOP in PHP ASAP!]]></title>
      <guid>http://www.phpdeveloper.org/news/11772</guid>
      <link>http://www.phpdeveloper.org/news/11772</link>
      <description><![CDATA[<p>
NETTUTS.com has posted <a href="http://nettuts.com/tutorials/php/oop-in-php/">an introduction</a> (using the Car analogy, of course) to teach you how to use the basics of object-oriented programming in PHP.
</p>
<blockquote>
PHP is so much more than a scripting language. It's a full-fledged language capable of building very complex applications. By harnessing the full power of Object Oriented Programming, you can reduce the amount of time you spend coding and use it to build better websites. This tutorial will show you how. 
</blockquote>
<p>
They explain objects, inheritance, encapsulation and polymorphism briefly before "getting their hands dirty" with some actual OOP PHP code. Their code example sets up a thumbnailer class - one that takes in an image, a height/width you want to resize it to (as properties) and splits it back out the other side.
</p>
<p>
As always, you can <a href="http://nettuts.s3.amazonaws.com/182_oop/example.zip">grab the source</a> or <a href="http://www.nettuts.com/demos/020_oop/sample.html">view the demo</a> to see it work.
</p>]]></description>
      <pubDate>Tue, 20 Jan 2009 09:36:36 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Brandon Savage's Blog: Keeping Superglobals Out Of Classes]]></title>
      <guid>http://www.phpdeveloper.org/news/11521</guid>
      <link>http://www.phpdeveloper.org/news/11521</link>
      <description><![CDATA[<p>
In a <a href="http://www.brandonsavage.net/entry/keeping-superglobals-out-of-classes.html">new post</a> to his blog, <i>Brandon Savage</i> makes a suggestion that could help in maintenance and debugging down the road - keep those superglobals out of your classes.
</p>
<blockquote>
Let's ignore the security implications of the above code for just a moment, and focus on just the use of the superglobal. By using the $_POST superglobal array, we're effectively doing two things [in the example code]: relying on the field names and limiting code reuse.
</blockquote>
<p>
He shows how to refactor the example into something a bit more reusable by changing the method call to pass in the given username and password instead of looking to the global for it. He does note, however, that there are some more correct uses for those superglobals:
</p>
<blockquote>
There are some legitimate uses of superglobals in classes. One example is the use of the $_SESSION superglobal, which is often used for things like a user object. But I urge you to do so sparingly, when appropriate, rather than relying heavily on superglobals which are subject to change and may not give you the data you expect.
</blockquote>]]></description>
      <pubDate>Mon, 08 Dec 2008 07:57:24 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[NETTUTS.com: Real-World OOP With PHP and MySQL]]></title>
      <guid>http://www.phpdeveloper.org/news/11457</guid>
      <link>http://www.phpdeveloper.org/news/11457</link>
      <description><![CDATA[<p>
On the NETTUTS.com site, there's a <a href="http://nettuts.com/tutorials/php/real-world-oop-with-php-and-mysql/">new tutorial</a> that looks to be a basic introduction to the world of Object-oriented programming in PHP.
</p>
<blockquote>
Numerous examples from robots to bicycles have been offered as "easy" explanations of what OOP is. I've opted to show you how OOP works with a real-life example, for a programmer. By creating a MySQL CRUD class you can easily create, read, update and delete entries in any of your projects, regardless of how the database is designed.
</blockquote>
<p>
Their CRUD example not only serves as an introduction to OOP, but can also be an introduction to MySQL support for those that haven't used it before. They create six functions - the four for CRUD and a connect and disconnect. The <A href="http://nettuts.s3.amazonaws.com/135_crud/source.zip">full source</a> is available for download too.
</p>]]></description>
      <pubDate>Wed, 26 Nov 2008 11:41:47 -0600</pubDate>
    </item>
  </channel>
</rss>

