<?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>Tue, 21 May 2013 23:48:44 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[DZone.com: Trying out PHP Refactoring Browser]]></title>
      <guid>http://www.phpdeveloper.org/news/19490</guid>
      <link>http://www.phpdeveloper.org/news/19490</link>
      <description><![CDATA[<p>
On DZone.com <i>Giorgio Sironi</i> has written up a post about <a href="http://css.dzone.com/articles/trying-out-php-refactoring">some testing he's done</a> with the ""PHP Refactoring Browser" (more on that <a href="http://phpdeveloper.org/news/19424">here</a>) on some basic code examples.
</p>
<blockquote>
IDE proponents love, in fact, an Integrated Development Environment that provides all the functionalities you need while writing and editing code; the followers of the Unix way typically write code in Vim while augmenting it via plugins where feasible and leveraging external tools that <a href="http://en.wikipedia.org/wiki/Unix_philosophy">do one thing, and do it well</a>. [...] Automated refactorings in PHP were out of the league of Vim and Unix users; thanks to Qafoo, however, a new open source tool is able to edit code with predefined refactoring recipes: PHP Refactoring Browser.
</blockquote>
<p>
He goes through some of the basic features and functionality of the browser, setting expectations a bit. He shows how to get it installed (via Composer) and the results of some of his testing. Rather than including them all in the post, he opted to <a href="https://github.com/giorgiosironi/prb-example/commits/master">make actual commits on github</a> of the changes.
</p>
Link: http://css.dzone.com/articles/trying-out-php-refactoring]]></description>
      <pubDate>Mon, 22 Apr 2013 10:03:35 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[QaFoo.com: PHP Refactoring Browser Alpha Release]]></title>
      <guid>http://www.phpdeveloper.org/news/19424</guid>
      <link>http://www.phpdeveloper.org/news/19424</link>
      <description><![CDATA[<p>
On the QaFoo blog today the company is introducing a new tool to help PHP developers write better, more optimized code - the <a href="http://qafoo.com/blog/041_refactoring_browser.html">PHP Refactoring 
Browser</a> (written in PHP too).
</p>
<blockquote>
Without continuous refactoring, code maintainability and extensibility will start to decrease fast, even if it has tests. Until now, only IDEs contained functionality to perform automated refactorings. And then even only PHPStorm contains the most important refactorings such as "extract method". Today we release the <a href="https://github.com/QafooLabs/php-refactoring-browser">PHP Refactoring Browser</a>, a refactoring tool written completely in PHP. It is based on several outstanding open-source libraries.
</blockquote>
<p>
The browser currently supports multiple refactoring methods including the extract method, renaming of local variables and converting a local variable to an instance. They include some example code and the result from the execution of the tool. The output shows where refactoring would work best with some color coding and formatting. 
</p>
<p>
You can find more about this new tool over <a href="https://github.com/QafooLabs/php-refactoring-browser">on its github repository</a>.
</p>
Link: http://qafoo.com/blog/041_refactoring_browser.html]]></description>
      <pubDate>Mon, 08 Apr 2013 09:49:33 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Brandon Savage: Effective Refactoring Strategies]]></title>
      <guid>http://www.phpdeveloper.org/news/18943</guid>
      <link>http://www.phpdeveloper.org/news/18943</link>
      <description><![CDATA[<p>
In a recent post to his site, <i>Brandon Savage</i> has <a href="http://www.brandonsavage.net/effective-refactoring-strategies/">a few helpful hints</a> to keep in mind when you're refactoring your applications to make them easier to maintain (and possibly perform better) in the future.
</p>
<blockquote>
The downtime [of this week] provides a perfect opportunity for the aspiring software developer to do the one thing they are always told there's no time to do: make the code better for better's sake. With few deadlines and plenty of free time, most developers can get a few hours of refactoring in to their code towards the end of the year. They can rearchitect sections that were implemented with haste in September; they can write tests for sections that were untested in April. Put another way, the "lost week" can be redeemed.
</blockquote>
<p>He has a few recommendations, each including their own brief summary:</p>
<ul>
<li>Test Everything First
<li>One Method, One Job (Also One Class, One Job)
<li>Don't Be Afraid Of More Objects And Classes
<li>Remove Dead, Unused, Unnecessary or Old Code
<li>Document Your Code
</ul>
<p>
Check out the <a href="http://www.brandonsavage.net/effective-refactoring-strategies/">full post</a> for the summaries and links to other useful resources.
</p>]]></description>
      <pubDate>Mon, 24 Dec 2012 11:24:57 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Marco Tabini's Blog: The easiest way to add unit test to your application]]></title>
      <guid>http://www.phpdeveloper.org/news/16837</guid>
      <link>http://www.phpdeveloper.org/news/16837</link>
      <description><![CDATA[<p>
In a new post to his blog <i>Marco Tabini</i> <a href="http://blog.tabini.ca/2011/09/the-easiest-way-to-add-unit-test-to-your-application/">offers some suggestions on unit testing</a> - not really a tutorial on how to it, more of an "easy way in" to introducing it to your development process.
</p>
<blockquote>
Stopping development for weeks while you figure out how to add unit tests to cover your entire codebase is simply something that cannot be done (at least, not if you want to keep your job), no matter what future benefits it might bring. The good news is, adding unit testing to your existing project only takes five minutes - which is pretty much how long it takes to get a unit testing framework installed. That's it. Move on.
</blockquote>
<p>
He puts the emphasis on unit testing to manage change in a code base, not so much to ensure that the current application runs as it should (not initially at least). He's found them most useful in bugfixing, refactoring and when adding new functionality. Current tests (and even tests written in TDD) can help with all of these. He includes reminders that if the tests aren't written well, they're useless and that once you've started testing, it needs to be continuous, even if they're not perfect.
</p>]]></description>
      <pubDate>Fri, 09 Sep 2011 09:17:32 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Devis Lucato's Blog: Anonymous objects in PHP - Composition, Mocks, Refactoring]]></title>
      <guid>http://www.phpdeveloper.org/news/15480</guid>
      <link>http://www.phpdeveloper.org/news/15480</link>
      <description><![CDATA[<p>
In <a href="http://lucato.it/php-anonymous-objects">a new post</a> to his blog <i>Devis Lucato</i> points out something he noticed when working with objects and anonymous functions/closures - they're not all as they seem.
</p>
<blockquote>
Both solutions allow to instantiate an anonymous object with properties. They are used as value objects and have no other purpose than storing values, so no logic can be included and they don't come with methods.  They can be used as function parameters instead of arrays, for instance. PHP 5.3.0 introduced anonymous functions and closures, so it is now possible to attach functions to these VOs (*). [...] The first thing to notice is that these properties are not methods but callable functions:
</blockquote>
<p>
In his example, an anonymous function dynamically appended to an object doesn't have access to a property set on the object just one line before. There's a way around it with <a href="http://php.net/call_user_func">call_user_func</a>, but it's not practical. His proposed solution is to create a type of Anonymous class that uses the __call method to catch the methods and translate them into calls to <a href="http://php.net/call_user_func_array">call_user_func_array</a> automatically. 
</p>]]></description>
      <pubDate>Tue, 23 Nov 2010 13:17:53 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Jani Hartikainen's Blog:  Refactoring explained to an absolute beginner]]></title>
      <guid>http://www.phpdeveloper.org/news/14710</guid>
      <link>http://www.phpdeveloper.org/news/14710</link>
      <description><![CDATA[<p>
When developers start graduating from just hacking together scripts and want to start looking toward the future, one thing they start thinking about is making their code the best it could be. One way to achieve this is refactoring, but where to start? Well, <a href="http://codeutopia.net/blog/2010/06/26/refactoring-explained-to-an-absolute-beginner/">this new post</a> has an introductory guide to help developers understand this powerful technique.
</p>
<blockquote>
Recently while on a drive with a non-programmer friend, I talked with him about code complexity and manageability, how very complicated code is detrimental to productivity and stuff like that. Later on, I decided to explain it to him with actual code examples, although the most he has ever done was some HTML back in elementary school.
</blockquote>
<p>
He starts with a basic PHP+HTML+MySQL script that mixes the three and shows how to break it apart in steps - moving the PHP away from the HTML, creating functions and making a "template" for the database fetch results to display in.
</p>]]></description>
      <pubDate>Mon, 28 Jun 2010 09:57:52 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Matt Curry's Blog: Review: Refactoring Legacy Applications Using CakePHP]]></title>
      <guid>http://www.phpdeveloper.org/news/12313</guid>
      <link>http://www.phpdeveloper.org/news/12313</link>
      <description><![CDATA[<p>
<i>Matt Curry</i> has <a href="http://www.pseudocoder.com/archives/2009/04/08/review-refactoring-legacy-applications-using-cakephp/">posted his review</a> of the recently released "Refactoring Legacy Applications Using CakePHP" book from <i>Chris Hartjes</i>. The book looks to help developers get a better feel for using CakePHP in real-world applications.
</p>
<blockquote>
Shortly after Chris Hartjes released his new book <A href="http://littlehart.net/book/">Refactoring Legacy Applications Using CakePHP</a> he contacted me and asked if I'd be willing to review it. I jumped at the chance and Chris emailed me the DRM free PDF. After posting it to <a href="http://www.littlehart.net/book/cakebook-sample.pdf">The PirateBay</a>, I settled in and gave it a read.
</blockquote>
<p>
Overall, <i>Matt</i> found the content of the book good but had a few things he might change - the "too smooth" nature of the update to CakePHP and the inclusion of a "partial refactoring" section (one that talked about only updating part of an application to the framework and integrating it with the rest of the site).
</p>]]></description>
      <pubDate>Thu, 09 Apr 2009 11:14:05 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Chris Hartjes' Blog: Preview of "Refactoring Legacy Applications using CakePHP"]]></title>
      <guid>http://www.phpdeveloper.org/news/11763</guid>
      <link>http://www.phpdeveloper.org/news/11763</link>
      <description><![CDATA[<p>
<i>Chris Hartjes</i>, a guru of <a href="http://www.cakephp.org">CakePHP</a> knowledge, is <a href="http://www.littlehart.net/atthekeyboard/2009/01/16/preview-of-refactoring-legacy-applications-using-cakephp/">putting together a book</a> - "Refactoring Legacy Applications Using CakePHP".
</p>
<blockquote>
Some of you may know that I have started writing a e-book about CakePHP. I'm planning on publishing it myself for the low, low price of $7. I thought I'd let people take a sneak peek at how it looks so far by publishing the first two chapters in very rough form. 
</blockquote>
<p>
You can find a rough draft <a href="http://cakebook.s3.amazonaws.com/cakephp_book.pdf">here</a> (pdf). Keep an eye out on <i>Chris'</i> blog for more (possible) preview releases and for the final product once its wrapped.
</p>]]></description>
      <pubDate>Mon, 19 Jan 2009 09:30:26 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPImpact Blog: Code Refactoring Guidelines]]></title>
      <guid>http://www.phpdeveloper.org/news/11029</guid>
      <link>http://www.phpdeveloper.org/news/11029</link>
      <description><![CDATA[<p>
<i>Federico</i> has <A href="http://phpimpact.wordpress.com/2008/09/14/code-refactoring-guidelines/">posted a list of suggestions</a> on things to look out for and to consider when you're refactoring your code.
</p>
<blockquote>
Refactoring neither fixes bugs nor adds new functionality, though it might precede either activity. Rather it improves the understandability of the code and changes its internal structure and design, and removes dead code, to make it easier to comprehend, more maintainable and amenable to change. Refactoring is usually motivated by the difficulty of adding new functionality to a program or fixing a bug in it.
</blockquote>
<p>
He's broken it out into a few topics with the suggestions underneath - things like looking at the "Big Picture", avoiding "Extreme Abstraction" and ensuring that your "Error Handling" is up to where it should be.
</p>]]></description>
      <pubDate>Tue, 16 Sep 2008 12:16:00 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Soledad Penades' Blog: Signs your PHP needs refactoring]]></title>
      <guid>http://www.phpdeveloper.org/news/7980</guid>
      <link>http://www.phpdeveloper.org/news/7980</link>
      <description><![CDATA[<p>
As <a href="http://feeds.feedburner.com/~r/funkablog/~3/122396798/">mentioned by</a> <i>Ed Finkler</i>, there's a list of <a href="http://www.soledadpenades.com/2007/06/05/signs-your-php-needs-refactoring/">signs your PHP needs refactoring</a> from <i>Soledad Penades</i>.
</p>
<blockquote>
<p>
I have had to go through a php application recently which has given me more than one headache and has required me to use all my possible patience. While working with it, I thought This is good material for an article, so that nobody else does the same in the future, and nobody else will need to experience the same displeasure as I have had to.
</p>
<p>
So here are the signs your PHP application needs a serious refactoring, right now
</p>
</blockquote>
<p>
Included in <a href="http://www.soledadpenades.com/2007/06/05/signs-your-php-needs-refactoring/">the list</a> are things like:
</p>
<ul>
<li>Uses global variables
<li>Everything's an array
<li>The neverending switch
<li>Interface inconsistency
</ul>
<p>
It hits on one of the thing that bugs me too, the problem of "Brackets galore" - so many subarrays that you have to resort to three or more sets of bracketed keys to get to the value you want. It's bad enough trying to follow someone else's code without having to "trace down" an array to figure out which of the values they're talking about.
</p>]]></description>
      <pubDate>Tue, 05 Jun 2007 16:26:00 -0500</pubDate>
    </item>
  </channel>
</rss>
