<?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 13:57:30 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[NetTuts.com: How to Write Testable and Maintainable Code in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/19594</guid>
      <link>http://www.phpdeveloper.org/news/19594</link>
      <description><![CDATA[<p>
NetTuts.com has a new tutorial posted suggesting a few ways you can make <a href="http://net.tutsplus.com/tutorials/php/how-to-write-testable-and-maintainable-code-in-php/">testable and maintainable code</a> in PHP applications.
</p>
<blockquote>
Frameworks provide a tool for rapid application development, but often accrue technical debt as rapidly as they allow you to create functionality. Technical debt is created when maintainability isn't a purposeful focus of the developer. Future changes and debugging become costly, due to a lack of unit testing and structure. Here's how to begin structuring your code to achieve testability and maintainability - and save you time.
</blockquote>
<p>
There's a few concepts they cover in the tutorial including DRY (don't repeat yourself), working with dependency injection and actually writing the tests with PHPUnit. They start with a bit of code that needs some work and use the tests to help refactor it into something that can be easily mocked (using <a href="http://net.tutsplus.com/tutorials/php/mockery-a-better-way/">Mockery</a>). 
</p>
Link: http://net.tutsplus.com/tutorials/php/how-to-write-testable-and-maintainable-code-in-php]]></description>
      <pubDate>Thu, 16 May 2013 11:53:18 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPBuilder.com: PHP Dependency Injection Creates More Maintainable Code]]></title>
      <guid>http://www.phpdeveloper.org/news/16279</guid>
      <link>http://www.phpdeveloper.org/news/16279</link>
      <description><![CDATA[<p>
On PHPBuilder.com <i>Jason Gilmore</i> has <a href="http://www.phpbuilder.com/columns/php-dependency-injection/Jason_Gilmore04292011.php3">posted a new article</a> looking at the benefits of dependency injection in helping you keep your code more maintainable and well-structured.
</p>
<blockquote>
 Of course, the advantages of object-orientation can only be fully exploited when implemented in conjunction with best practices such as encapsulation and inheritance. One such "implementational" best practice is dependency injection, a design pattern that facilitates the decoupling of otherwise dependent components. [...] Save yourself the trouble and decouple components using dependency injection.
</blockquote>
<p>
He gives an example of how a simple dependency injection (DI) method on an "Account" class to take the database connection dependency out of the actual class and into an encapsulated object. This way, any sort of standardized database object can be passed in and acted upon. He also mentions two dependency injection containers you could use to help you implement it - <a href="http://components.symfony-project.org/dependency-injection/">Symfony's</a> and <a href="https://github.com/fabpot/Pimple">Pimple</a>.
</p>]]></description>
      <pubDate>Mon, 02 May 2011 09:52:05 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Maintainable Software Seeks PHP Developer (Telecommute)]]></title>
      <guid>http://www.phpdeveloper.org/news/7572</guid>
      <link>http://www.phpdeveloper.org/news/7572</link>
      <description><![CDATA[<table cellpadding="3" cellspacing="2" border="0">
<tr>
	<td style="font-weight:bold;vertical-align:top;font-size:11px">Company</td>
	<td style="font-size:11px">Maintainable Software</td>
</tr>
<tr>
	<td style="font-weight:bold;vertical-align:top;font-size:11px">Location</td>
	<td style="font-size:11px">Telecommute</td>
</tr>
<tr>
	<td style="font-weight:bold;vertical-align:top;font-size:11px">Title</td>
	<td style="font-size:11px">PHP Developer</td>
</tr>
<tr>
	<td style="font-weight:bold;vertical-align:top;font-size:11px">Summary</td>
	<td style="font-size:11px">
	<p>
	Qualifications:
	<ul>
	<li>Strong understanding of XHTML, CSS, and standards-based design
	<li>Object Oriented Programming experience and familiarity with testing
	<li>Knowledge of key differences between PHP 4 and 5
	<li>Some experience with XML and web services
	<li>Familiarity with MySQL and be able to write SQL queries
	<li>Understanding of source control including branching and tagging
	<li>Working knowledge of the UNIX shell and configuring Apache with PHP
	<li>Strong work ethnic, be a team player, and have excellent reference
	</ul>
	</p>
	</td>
</tr>
<tr>
	<td style="font-weight:bold;vertical-align:top;font-size:11px">Link</td>
	<td style="font-size:11px"><a href="http://maintainable.com/about/careers ">More Information</a></td>
</tr>
</table>]]></description>
      <pubDate>Fri, 06 Apr 2007 07:10:43 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Laura Thomson's Blog: NYPHP Conference 2006 ("Writing Maintainable Code")]]></title>
      <guid>http://www.phpdeveloper.org/news/5449</guid>
      <link>http://www.phpdeveloper.org/news/5449</link>
      <description><![CDATA[<p>
<i>Laura Thomson</i> has a brief mention on her blog today about the talk she'll be giivng at this year's <a href="http://www.nyphpcon.com/">New York PHP Conference</a> concerning "<a href="http://www.nyphpcon.com/speakers.php#093f165054b6d7d4ac3eb77f49c07f77">Writing Maintainable Code</a>".
</p>
<quote>
<i>
I think of it as an anti-<a href="http://thedailywtf.com/">The-Daily-WTF</a> talk, and it should be more entertaining than it perhaps sounds. (If you've never read the WTF, I strongly recommend it both for entertainment and enlightenment.) I believe in terse, elegant code that gets the job done, which perhaps reflects my origins as a C programmer rather than as a Java one. 
</i>
</quote>
<p>
You can get complete details on her talk and on the conference from the <a href="http://www.nyphpcon.com/">official New York PHP Conference website</a>, including saving your place at the conference by registering.
</p>]]></description>
      <pubDate>Fri, 26 May 2006 05:58:54 -0500</pubDate>
    </item>
  </channel>
</rss>
