<?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 06:27:40 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Freek Lijten's Blog: SOLID - The O is for Open Closed Principle]]></title>
      <guid>http://www.phpdeveloper.org/news/17916</guid>
      <link>http://www.phpdeveloper.org/news/17916</link>
      <description><![CDATA[<p>
<i>Freek Lijten</i> has posted the <a href="http://www.freeklijten.nl/home/2012/05/07/SOLID-the-O-is-for-Open-Closed-Principle">second part</a> of his series looking at the <a href="http://en.wikipedia.org/wiki/SOLID_(object-oriented_design)">SOLID</a> development methodology. In this latest post his looks at the second letter in the acronym - "O" for "Open Closed Principle."
</p>
<blockquote>
Software that requires an enormous amount of changes to implement one new feature or fix a bug is unstable and should be considered as "bad". Software should be designed so, that in case of a new feature, no existing classes should have to change. In other words: it is closed for modification. Existing software may be extended to achieve new features however.
</blockquote>
<p>
He starts off with a "What" section explaining a bit more about what this open/closed means for your code and gets into an example showing it in a more practical way. He shows how to take the principle and refactor an API connector class to pass in the object it needs (Bike) and use that to get information (rather than just passing in the data). He uses a <a href="http://en.wikipedia.org/wiki/Factory_pattern">Factory</a> to get the object type he needs based on the Bike type.
</p>]]></description>
      <pubDate>Mon, 07 May 2012 10:45:37 -0500</pubDate>
    </item>
    <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[Erskine Labs Blog: What should they know of PHP who only PHP know?]]></title>
      <guid>http://www.phpdeveloper.org/news/16569</guid>
      <link>http://www.phpdeveloper.org/news/16569</link>
      <description><![CDATA[<p>
On the Erskine Labs blog today there's a new post from <i>Wil Linssen</i> with a suggestion to PHP developers who specialize in the language - <a href="http://erskinelabs.com/what-should-they-know-php-who-only-php-know/">take the time to learn another language</a> and broaden your skills.
</p>
<blockquote>
So many languages share fundamental principles, and indeed many are even derived from the same concepts, but because they differ in their approach there's something new to understand in each. It's these differences that will frequently bolster your understanding of your primary language, or indeed of programming as a whole.
</blockquote>
<p>
He notes that it's not just PHP developers that pigeon hole themselves into one language - developers on other languages do to. He recommends they lift their heads up and branch out and stop attacking other languages with "language X is best" articles.
</p>
<blockquote>
It's stepping outside of your comfort zone and engaging with the underlying concepts of the languages and tools you are using that will enable you to grow as a developer. 
</blockquote>]]></description>
      <pubDate>Fri, 08 Jul 2011 12:15:01 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Zend Developer Zone: SOLID OO Principles]]></title>
      <guid>http://www.phpdeveloper.org/news/16431</guid>
      <link>http://www.phpdeveloper.org/news/16431</link>
      <description><![CDATA[<p>
On the Zend Developer Zone there's a recent post from <i>Keith Casey</i> about some of the <a href="http://devzone.zend.com/article/15243-SOLID-OO-Principles">basics of good OOP design</a>, specifically in following the <a href="http://en.wikipedia.org/wiki/Solid_(object-oriented_design)">SOLID</a> principles - a set of five guidelines that make code easier to manage and maintain over time.
</p>
<blockquote>
As much as we're like to believe that "loose coupling, high cohesion" is enough, when you actually dive into the concept, you find that it's more descriptive than prescriptive. If you want to know how to actually apply these to your day to day development, you have to get into the <a href="http://en.wikipedia.org/wiki/Solid_(object-oriented_design)">SOLID</a> principles which describes the five tangible aspects that "good" OO design should contain.
</blockquote>
<p>
He goes through each of the five principles in the list, describing what they are and, for some, including a bit of sample code to make the point clearer:
</p>
<ul>
<li>Single Responsibility Principle (SRP)
<li>Open/Closed Principle (OCP)
<li>Liskov Substitution Principle (LSP)
<li>Interface Segregation Principle (ISP)
<li>Dependency Inversion Principle (DIP)
</ul>]]></description>
      <pubDate>Mon, 06 Jun 2011 12:06:35 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[DZone.com: SOLID for packag...err, namespaces]]></title>
      <guid>http://www.phpdeveloper.org/news/15985</guid>
      <link>http://www.phpdeveloper.org/news/15985</link>
      <description><![CDATA[<p>
On DZone.com there's a recent article from <i>Giorgio Sironi</i> about the SOLID set of principles for software development (more on those <a href="http://butunclebob.com/ArticleS.UncleBob.PrinciplesOfOod">here</a>) and how some related principles can be applied to namespaced code in PHP.
</p>
<blockquote>
While studying for the advanced software engineering exam at PoliMi, I discovered there is also a set of principles akin to SOLID for the design of packages, and not only of classes and interfaces. <a href="http://butunclebob.com/ArticleS.UncleBob.PrinciplesOfOod">Uncle Bob published them</a> after the SOLID series. Note that package here can be intended as a zip or any deliverable binary unit, not necessarily as a PHP namespace or Java package, or a source folder. [...]  In fact, I think that PHP namespaces will play the role of packages soon, as they provide a mechanism for encapsulation: use statements are not necessary when you refer to entities in the same namespace, just like java imports.
</blockquote>
<p>These three additional principles (CCA) are:</p>
<ul>
<li>CRP: Common Reuse Princple
<li>CCP: Common Closure Principle
<li>ADP: Acyclic Dependencies Principle
</ul>
<p>
Check out the rest of <a href="http://css.dzone.com/articles/solid-packag-err-namespaces">the article</a> for their full descriptions.
</p>]]></description>
      <pubDate>Wed, 02 Mar 2011 10:54:33 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[NETTUTS.com: 10 Principles of the PHP Masters]]></title>
      <guid>http://www.phpdeveloper.org/news/10989</guid>
      <link>http://www.phpdeveloper.org/news/10989</link>
      <description><![CDATA[<p>
The NETTUTS website has posted <a href="http://nettuts.com/articles/10-principles-of-the-php-masters/">a top ten list</a> of things from the PHP masters out there, a few words of wisdom to live by. Here's the list along with the authors of each:
</p>
<ul>
<li>Use PHP Only When You Need it - Rasmus Lerdorf
<li>Use Many Tables With PHP and MYSQL for Scalability - Matt Mullenweg
<li>Never, ever trust your users - Dave Child
<li>Invest in PHP Caching - Ben Balbo
<li>Speed up PHP Development with an IDE, Templates and Snippets - Chad Kieffer
<li>Make Better Use of PHP's Filter Functions - Joey Sochacki
<li>Use a PHP Framework - Josh Sharp
<li>Don't use a PHP Framework - Rasmus Lerdorf
<li>Use Batch Processing - Jack D. Herrington
<li>Turn on Error Reporting Immediately - David Cummings
</ul>
<p>
Some of <a href="http://nettuts.com/articles/10-principles-of-the-php-masters/">them</a> are conflicting, but that just means that you'll have to do what you've always done - take advice with a grain of salt and ultimately decide what's best for you and your application.
</p>]]></description>
      <pubDate>Tue, 09 Sep 2008 10:28:34 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPFreaks: OO PHP Parts One & Two]]></title>
      <guid>http://www.phpdeveloper.org/news/10366</guid>
      <link>http://www.phpdeveloper.org/news/10366</link>
      <description><![CDATA[<p>
PHPFreaks has posted <a href="http://feeds.feedburner.com/~r/phpfreaks/~3/306320302/oo-php-part-1-oop-in-full-effect">part one</a> and <a href="http://feeds.feedburner.com/~r/phpfreaks/~3/306839599/oo-php-part-2-boring-oo-principles">part two</a> of a new series they're working on to introduce those new to the language to the concepts of object-oriented programming in PHP.
</p>
<blockquote>
On the old site, I started a series of tutorials named "PHP Application Design". I planned for at least three parts, and while I did publish the first two and wrote at least half of part three, I found myself out of time to make it to the finish. Still dedicated to writing reusable and extensible PHP code and spreading the knowledge, this is a restart of the series, renamed as simply "OO PHP"
</blockquote>
<p>
In <a href="http://www.phpfreaks.com/tutorial/oo-php-part-1-oop-in-full-effect">part one</a> he looks at the basics of OOP (terms, defining properties/methods, autoload, exceptions, type hinting, etc) with some code examples sprinkled through out. <a href="http://www.phpfreaks.com/tutorial/oo-php-part-2-boring-oo-principles">Part two</a> looks at the "boring OOP principles" like polymorphism, encapsulation and heuristics.
</p>
]]></description>
      <pubDate>Mon, 09 Jun 2008 08:48:00 -0500</pubDate>
    </item>
  </channel>
</rss>

