<?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, 19 May 2013 17:00:24 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Scott Mattocks: D is for Documentation]]></title>
      <guid>http://www.phpdeveloper.org/news/19263</guid>
      <link>http://www.phpdeveloper.org/news/19263</link>
      <description><![CDATA[<p>
<i>Scott Mattocks</i> has wrapped up his series about LUCID development with the final letter of the acronym - <a href="http://crisscott.com/2013/03/02/d-is-for-documentation/"><b>D</b> is for Documentation</a>.
</p>
<blockquote>
Despite mankind's best efforts, writing code is still clearly an exercise for talking to computers. It has not evolved to the point where talking to a computer is as easy and natural as talking to other people. That's why documentation is so important. Programming languages are just a translation of a developer's intent into something a computer can execute.
</blockquote>
<p>
He points out that even a little documentation can go a long way (even in presentations with code in the slides). It provides context and the intent of the code, not just details about what it's doing. He proposes a compliment practice to test-driven development (TDD) that turns the documentation process around - Documentation Driven Development. This is essentially writing up what the code does first, then writing tests to check it and only then writing the code to make it happen. 
</p>
<p>
If you're interested in the rest of the articles in the series, check out <a href="http://crisscott.com/tag/lucid/">the LUCID article</a> on his site with links to each letter's article.
</p>]]></description>
      <pubDate>Mon, 04 Mar 2013 09:30:16 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Benjamin Eberlei: Doctrine and SOLID]]></title>
      <guid>http://www.phpdeveloper.org/news/19137</guid>
      <link>http://www.phpdeveloper.org/news/19137</link>
      <description><![CDATA[<p>
<i>Benjamin Eberlei</i> has a new post to his site today answering a question he sometimes gets about <a href="http://www.whitewashing.de/2013/02/04/doctrine_and_solid.html">using Doctrine2 in a SOLID context</a> (more on SOLID development <a href="http://en.wikipedia.org/wiki/SOLID_(object-oriented_design)">here</a>) as it seems difficult to follow the Single Responsibility Principle with how the tool is used.
</p>
<blockquote>
These problems are related to the inability to share behavioral code through aggregation and the complexity of state transformations. Combining both, your average entity with 5-15 fields can end up with hundrets or thousands lines of code. The solutions to both problems boil down to <a href="http://www.jbrains.ca/permalink/the-four-elements-of-simple-design">minimizing duplication and maximizing clarity</a>.
</blockquote>
<p>
He looks at two different kinds of objects Doctrine uses in its setup, the value objects and method objects, and "maximize clarity" on them by dividing them up into more functional-related objects, passed into each other via method injection.
</p>]]></description>
      <pubDate>Tue, 05 Feb 2013 11:09:33 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[NetTuts.com: How to Write Code That Embraces Change]]></title>
      <guid>http://www.phpdeveloper.org/news/19132</guid>
      <link>http://www.phpdeveloper.org/news/19132</link>
      <description><![CDATA[<p>
On NetTuts.com today there's a great new article about how to <a href="http://net.tutsplus.com/tutorials/how-to-write-code-that-embraces-change/">write code that embraces change</a> and can be easily updated and reconfigured due to a decoupled nature and use of good OOP concepts.
</p>
<blockquote>
Writing code, which is easy to change is the Holy Grail of programming. Welcome to programming nirvana! But things are much more difficult in reality: source code is difficult to understand, dependencies point in countless directions, coupling is annoying, and you soon feel the heat of programming hell. In this tutorial, we will discuss a few principles, techniques and ideas that will help you write code that is easy to change.
</blockquote>
<p>
He covers some of the good OOP principles to think about when developing - like cohesion, orthogonality and coupling (via class methods, polymorphism, dependency injection or interfaces). He spends some time looking at the <a href="http://en.wikipedia.org/wiki/SOLID_(object-oriented_design)">SOLID</a> development principles and how you can implement each of them in some sample code. He also talks some about high level design and how the separation of concerns can help make your code easier to maintain and change.
</p>]]></description>
      <pubDate>Mon, 04 Feb 2013 13:18:58 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Scott Mattocks: I is for Isolation]]></title>
      <guid>http://www.phpdeveloper.org/news/19046</guid>
      <link>http://www.phpdeveloper.org/news/19046</link>
      <description><![CDATA[<p>
<i>Scott Mattocks</i> has posted the next "letter" in his LUCID development series (<a href="http://crisscott.com/tag/lucid/">more here</a>) - the <a href="http://crisscott.com/2013/01/16/i-is-for-isolation/">I is for Isolation</a>:
</p>
<blockquote>
Applications are a collection of individual components; they pull together the contributions of individuals to create something which is greater than the sum of its parts. If one piece breaks down, and the system is not prepared to put it in quarantine, the entire application can come crashing down. [...] The best way to stave off this infection is to prevent it at the source. Keep the application happy by making it more resistant to implosion.
</blockquote>
<p>
He talks about the "code jerks" of your application that hog resources or functionality and cause general problems for the application as a whole. He notes that sometimes it's the result of a third party, but it can also be internal (and more difficult to find). He gives a more specific example of a database wrapper class and some suggestions of things to do as failover (ex. used cached data or read from a secondary). 
</p>]]></description>
      <pubDate>Wed, 16 Jan 2013 12:02:23 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Scott Mattocks: C is for Configurable]]></title>
      <guid>http://www.phpdeveloper.org/news/18824</guid>
      <link>http://www.phpdeveloper.org/news/18824</link>
      <description><![CDATA[<p>
<i>Scott Mattocks</i> has posted the next in his "LUCID development" series of posts with the next letter in the acronym, <a href="http://crisscott.com/2012/11/30/c-is-for-configurable/">"C" for Configurable</a>:
</p>
<blockquote>
As code moves through the software development process, it moves through different environments. In many cases, the full details of then environment may not even be known at the time development starts. Getting your code to change its behavior on the fly is only possible if you have carefully and thoughtfully interleaved configuration parameters into your code.
</blockquote>
<p>
He talks about handling configuration for external systems and the responsibility that comes with access to the connection information for resources. He makes some recommendations as to where to start if you're looking for places in your code to change how configuration options are used - low hanging fruit like code that accesses external systems.
</p>
<p>
Other parts of this LUCID series so far are: <a href="http://crisscott.com/2012/09/21/l-is-for-logging/">L</a> (Logging) and <a href="http://crisscott.com/2012/10/18/u-is-for-unit-tests/">U</a> (Unit tests).
</p>]]></description>
      <pubDate>Fri, 30 Nov 2012 09:12:21 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Scott Mattocks: U is for Unit Tests]]></title>
      <guid>http://www.phpdeveloper.org/news/18632</guid>
      <link>http://www.phpdeveloper.org/news/18632</link>
      <description><![CDATA[<p>
Returning with another part of his series on his concept of <a href="http://crisscott.com/2012/09/11/lucid-development/">LUCID development</a>, <i>Scott Mattocks</i> has <a href="http://crisscott.com/2012/10/18/u-is-for-unit-tests/">this new post</a> for the "U" about unit testing.
</p>
<blockquote>
Unit tests are like Google Maps for your code. When you zoom in and look at small pieces, you can only go so far. However, when you zoom out and take a look from a greater distance, you can see the full path from A to B. The idea of unit testing, as it relates to <a href="http://crisscott.com/2012/09/11/lucid-development/">LUCID development</a>, is that it maps out all the different ways to get from one end of your application to the other. Unit tests take the question of "how does my data get from the my user's request, through my code and back to the user again?" They answer that question just like any well written application: by breaking it down into smaller more manageable chunks.
</blockquote>
<p>
He talks some about the purpose of the tests themselves - finding the exact point where something goes wrong, answering one question at a time. He points out that testing isn't just something that's to be done when the code is first written. The tests need to be continuously groomed and updated as things change too.
</p>
<p>
You can find the first part of the series, "L is for Logging" <a href="http://crisscott.com/2012/09/21/l-is-for-logging">here</a>.
</p>]]></description>
      <pubDate>Fri, 19 Oct 2012 09:52:07 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Scott Mattocks: L is for Logging (LUCID)]]></title>
      <guid>http://www.phpdeveloper.org/news/18509</guid>
      <link>http://www.phpdeveloper.org/news/18509</link>
      <description><![CDATA[<p>
<i>Scott Mattocks</i> has started off his series about the LUCID development methodology (one he <a href="http://crisscott.com/2012/09/11/lucid-development/">recently proposed</a>) with the first article covering <a href="http://crisscott.com/2012/09/21/l-is-for-logging/">"L" for Logging</a>.
</p>
<blockquote>
Communication is the only way you can tell if an application is feeling well or is about to fall apart. If your application can't talk to you, you have no way of helping it to feel better. The L in <a href="http://crisscott.com/2012/09/11/lucid-development/">LUCID</a> is for logging. Logs are how applications speak. They capture information that allows us to pick up on those little signs and act early enough to make sure the application doesn't come down with the flu. If you don't have good logging throughout your system, the best you can do is react to your application falling over. A silent application is an application destined to cause midnight surprises for you and your operations team.
</blockquote>
<p>
He talks about the difference between "just logging" and "correct logging" as well as a recommendation for the different levels: trace, debug, info, warn and error. 
</p>
<blockquote>
Letting you know that something went wrong is really only half of a log messages job. The other responsibilities of a log message are to allow you to accurately reproduce the conditions under which the event occurred, and to allow you to fix any data inconsistencies.
</blockquote>]]></description>
      <pubDate>Mon, 24 Sep 2012 09:23:57 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Scott Mattocks: LUCID Development]]></title>
      <guid>http://www.phpdeveloper.org/news/18467</guid>
      <link>http://www.phpdeveloper.org/news/18467</link>
      <description><![CDATA[<p>
<i>Scott Mattocks</i> has <a href="http://crisscott.com/2012/09/11/lucid-development/">a new post</a> to his site today about a set of development principles he's proposing called "LUCID" (similar in idea to <a href="http://en.wikipedia.org/wiki/SOLID_(object-oriented_design)">SOLID</a>) - Logs, Unit Tested, Configurable, has Isolated features and is fully Documented.
</p>
<blockquote>
Building software with a clear set of use cases and requirements is a relatively straight forward process. Various design patterns exist to help you solve problems which others have come across already. You can use principles like SOLID to help separate your classes and simplify your code. [...] Using a set of guidelines like SOLID may make it easier to swap out a broken class for a new class, but they don't really help you identify the problem or fix any data corruption which may have occurred. Knowing you have a problem and being able to isolate and fix the problem is just as important, if not more so, than being able to rely on consistent interfaces from your factory method. That is why I am proposing an additional set of software development guidelines called "LUCID code."
</blockquote>
<p>
He defines it as "code with understands that bugs are unavoidable" and is able to give developers feedback through its own logging, tests and documentation. With correctly isolated code, development can be segmented and worked at the same time and make changing requirements and updating functionality simpler in the long run. 
</p>]]></description>
      <pubDate>Wed, 12 Sep 2012 08:14:46 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[NetTuts.com: 3 Key Software Principles You Must Understand]]></title>
      <guid>http://www.phpdeveloper.org/news/18000</guid>
      <link>http://www.phpdeveloper.org/news/18000</link>
      <description><![CDATA[<p>
On the NetTuts.com site today there's <a href="http://net.tutsplus.com/tutorials/tools-and-tips/3-key-software-principles-you-must-understand/">a set of reminders</a> about some software principles that all developers (PHP or otherwise) should keep in mind when doing their work:
</p>
<blockquote>
he fundamental things will always apply. If you have an understanding of the underlying ideas of software development, you will quickly adjust to new techniques. In this tutorial, we will discuss three basic principles and mix them with many more. They provide a powerful way of managing the complexity of software. I'll share some of my personal opinions and thoughts, which, hopefully, will prove useful when it comes to applying them to code and real-world projects.
</blockquote>
<p>Their three ideas that should always be in mind during development are:</p>
<ul>
<li>DRY - Don't Repeat Yourself
<li>KISS - Keep It Simple Stupid
<li>"You Ain't Gonna Need It" (YAGNI?)
</ul>
<p>
For each principle, there's a but of an example showing either some current project that follows the idea or a process that can be used to implement it.
</p>]]></description>
      <pubDate>Thu, 24 May 2012 09:49:40 -0500</pubDate>
    </item>
    <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>
  </channel>
</rss>
