<?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:40:23 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[NetTuts.com: Aspect-Oriented Programming in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/17945</guid>
      <link>http://www.phpdeveloper.org/news/17945</link>
      <description><![CDATA[<p>
On the NetTuts.com (Plus) site there's a new tutorial focusing on <a href="http://net.tutsplus.com/tutorials/php/aspect-oriented-programming-in-php/">aspect-oriented programming in PHP</a>, a shift from the usual methods of development with the goal of "crosscutting" your classes/objects by weaving in extra functionality. Their examples of this method use the <a href="http://flow3.typo3.org/">FLOW3</a> framework.
</p>
<blockquote>
All modern frameworks (including FLOW3) push a lot of patterns into the software stack that do a great job at separating the concerns of your business logic; among them the famous MVC that is separating your logic into different layers. However, an application is not only built on business logic alone. As it grows, you may want to implement additional services, features, plugins or plugins of plugins. You surely don't want this stuff in your business logic! But what are your options?
</blockquote>
<p>
For their example, they show how to implement a logger across your classes, taking it out of the actual code and implementing it in an aspect (at the "pointcut") by "weaving" it into a DocBlock comment with special annotations. They help you get the FLOW3 framework set up and show you how to "kickstart" a new project and work with its controllers and resources. They show you how to implement the Logging aspect and how to define it in your code (and where it caches the requests).
</p>]]></description>
      <pubDate>Fri, 11 May 2012 09:34:18 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Stuart Herbert's Blog: ContractLib - An Introduction & Comparing it to PHP's Assert]]></title>
      <guid>http://www.phpdeveloper.org/news/17405</guid>
      <link>http://www.phpdeveloper.org/news/17405</link>
      <description><![CDATA[<p>
<i>Stuart Herbert</i> has two new posts to his blog showing how to use the <a href="https://github.com/stuartherbert/ContractLib">ContractLib</a> tool he's created to define programming "contracts". In <a href="http://blog.stuartherbert.com/php/2012/01/16/getting-started-with-contractlib/">the first</a> he shows some sample usage of the tool and in <a href="http://blog.stuartherbert.com/php/2012/01/17/comparing-contractlib-to-phps-built-in-assert/">the second</a> he compares the functionality of ContractLib's features and PHP's own "<a href="http://us3.php.net/assert">assert</a>" method.
</p>
<blockquote>
<a href="https://github.com/stuartherbert/ContractLib">ContractLib</a> is a simple-to-use PHP component for easily enforcing programming contracts throughout your PHP components. These programming contracts can go a long way to helping you, and the users of your components, develop more robust code.
</blockquote>
<p>
In <a href="http://blog.stuartherbert.com/php/2012/01/16/getting-started-with-contractlib/">his example tests</a> he shows how to set a pre-condition on a method's input ensuring that it will always be the correct datatype (array). In <a href="http://blog.stuartherbert.com/php/2012/01/17/comparing-contractlib-to-phps-built-in-assert/">his comparison</a> with PHP's "assert", he lists out some of the features that either one has and notes that ContractLib allows you to be much more flexible with your checking than just simple statements.
</p>]]></description>
      <pubDate>Tue, 17 Jan 2012 10:58:38 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Stuart Herbert's Blog: Introducing ContractLib (Programming Contracts)]]></title>
      <guid>http://www.phpdeveloper.org/news/17394</guid>
      <link>http://www.phpdeveloper.org/news/17394</link>
      <description><![CDATA[<p>
In <a href="http://blog.stuartherbert.com/php/2012/01/11/introducing-contractlib/">this recent post</a> to his blog <i>Stuart Herbert</i> introduces a system he's created to handle "contracts" in PHP development - <a href="https://github.com/stuartherbert/ContractLib">ContractLib</a>.
</p>
<blockquote>
Programming contracts are tests around functions and methods, and they are normally used: to catch any 'bad' data that has been passed into the function or method from the caller, and to catch any 'bad' data generated by the function or method before it can be returned to the caller. These are pre-condition and post-condition tests, and they are tests that either pass or fail.
</blockquote>
<p>
He points out that by having contracts you not only increase the robustness of your code but you also save time not trying to hunt down data-related issues. Using pre-conditions, you can can check data to ensure things like correct formatting, data that's out of range and data that might be missing. His <a href="https://github.com/stuartherbert/ContractLib">ContractLib</a> comes with a set of <a href="https://github.com/stuartherbert/ContractLib/tree/master/src/tests">tests</a> that provide good examples of how to use the functionality. Installation instructions are included.
</p>]]></description>
      <pubDate>Fri, 13 Jan 2012 14:11:52 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Kevin Schroeder's Blog: What programming rules should you ALWAYS follow?]]></title>
      <guid>http://www.phpdeveloper.org/news/17105</guid>
      <link>http://www.phpdeveloper.org/news/17105</link>
      <description><![CDATA[<p>
In a quick new post today <i>Kevin Schroeder</i> asks his readers for feedback on <a href="http://www.eschrade.com/page/what-programming-rules-should-you-always-follow">what programming rules you should always follow</a> in your development practices.
</p>
<blockquote>
Earlier today, more for my own interest, I asked the question on Twitter "What programming rules should you ALWAYS follow, regardless of the scenario you're working in?"  In other words, are there programming rules that you ALWAYS should follow.  It doesn't matter if it's a script to copy a bunch of files for a one time migration or if you're building the next Facebook (DON'T try to build the next Facebook.  You will fail miserably.  Build something else).  In other words, what was the purist of programming rules.
</blockquote>
<p>
Responses he received ranged from the simple to slightly more complex including:
</p>
<ul>
<li>Always comment your code
<li>Test your code
<li>Use source control
<li>"Think. Think again. Then write code"
<li>Use a good debugger to help track down problems
<li>Make effective use of logging/output
</ul>]]></description>
      <pubDate>Wed, 09 Nov 2011 09:20:37 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Lars Tesmer's Blog: Learning Ruby: Gotchas and Pitfalls for PHP Programmers]]></title>
      <guid>http://www.phpdeveloper.org/news/16856</guid>
      <link>http://www.phpdeveloper.org/news/16856</link>
      <description><![CDATA[<p>
<i>Lars Tesmer</i> is currently in the process of learning Ruby. He' been working through the tutorials and some sample scripts and has come across some pitfalls along the way. In his <a href="http://lars-tesmer.com/blog/2011/09/13/learning-ruby-gotchas-and-pitfalls-for-php-programmers/">latest post</a> he shares four of them that've stood out in his development so far.
</p>
<blockquote>
I'm currently learning Ruby. In this post I'll list some pitfalls for programmers coming from PHP that would probably cause some confusion if you aren't aware of them. This list is by no means complete, while I learn Ruby I'll very probably encounter more gotchas, which I will blog about, too.
</blockquote>
<p>
For each of his four examples, he gives the code PHP developers are used to seeing and the Ruby code that may or may not do what you'd expect:
</p>
<ul>
<li>Arrays are continuous
<li>Zero is not falsy
<li>The keywords private and protected
<li>There's no static keyword
</ul>]]></description>
      <pubDate>Wed, 14 Sep 2011 09:48:42 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Sameer Borate's Blog: Functional programming with Underscore.php]]></title>
      <guid>http://www.phpdeveloper.org/news/16849</guid>
      <link>http://www.phpdeveloper.org/news/16849</link>
      <description><![CDATA[<p>
In a new post to his blog <i>Sameer Borate</i> looks at <a href="http://www.codediesel.com/php/functional-programming-with-underscore-php/">using the Underscore.php library</a> to do a little functional programming in PHP. <a href="http://brianhaveri.github.com/Underscore.php/">Underscrore.php</a>is a PHP port of <a href="http://documentcloud.github.com/underscore/">Underscrore.js</a>.
</p>
<blockquote>
Underscore.php provides a utility library for PHP that provides a lot of the functional programming support that a programmer would expect in Ruby, but without adding much overhead during execution. The only caveat is that underscore.php requires PHP 5.3 or greater. Although you could accomplish some of the things using PHP's built in functions, the functional approach looks intuitive and easy to work with.
</blockquote>
<p>
He gives a few simple code examples - one using the "pluck" method to pull certain values out of an array, the "map" method to apply a transformation to each item in an array and some OOP examples showing the use of the "max" and "template" methods.
</p>]]></description>
      <pubDate>Tue, 13 Sep 2011 08:53:49 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[IT World: Lost programming skills]]></title>
      <guid>http://www.phpdeveloper.org/news/16769</guid>
      <link>http://www.phpdeveloper.org/news/16769</link>
      <description><![CDATA[<p>
On IT World there's an interesting article about the programming skills that <a href="http://www.itworld.com/print/190213">seem to be lost in today's coders</a> and how what they may not know might hurt them in the end.
</p>
<blockquote>
Some of these skills aren't likely to be needed again, any more than most of us need to know how to ride a horse or (sigh) drive a manual-transmission vehicle. But other skills and "lessons learned" may still or again prove relevant, whether developers are banging their heads against legacy systems, coding for new mobile and embedded devices... or other devices and applications we haven't yet thought of. [...] Here's what some industry veterans and seasoned coders think the younger generation doesn't know ... but should.
</blockquote>
<p>
He's broken it up into a few different sections - one dealing with the lack of general hardware knowledge by a good section of the today's developers, another noting that programming is not the same as software engineering (yes, really). He also touches on the lacking idea of "thinking before coding" and how planning for errors has become less and less of an importance.
</p>]]></description>
      <pubDate>Thu, 25 Aug 2011 08:50:42 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Smashing Magazine: My Favorite Programming Mistakes]]></title>
      <guid>http://www.phpdeveloper.org/news/16570</guid>
      <link>http://www.phpdeveloper.org/news/16570</link>
      <description><![CDATA[<p>
On the Smashing Magazine site there's a post some of <i>Paul Tero</i>'s <a href="http://coding.smashingmagazine.com/2011/07/07/my-favorite-programming-mistakes/">favorite programming mistakes</a> he's come across and heard of in his time programming.
</p>
<blockquote>
I like to classify these mistakes into three broad groups: cock-ups (or screw-ups in American English), errors and oversights. A cock-up is when you stare blankly at the screen and whisper "Oops": things like deleting a database or website, or overwriting three-days worth of work, or accidentally emailing 20,000 people. Errors cover everything, from simple syntax errors like forgetting a } to fatal errors and computational errors.
</blockquote>
<p>Included in his list are things like:</p>
<ul>
<li>Leaving Debug Mode On
<li>Turning Debug Mode Off
<li>Wrong Variable Type
<li>1p Errors
</ul>
<p>
Examples of each are included with both code and descriptions as well as "lessons learned" to help you not make the same mistakes in your applications.
</p>]]></description>
      <pubDate>Fri, 08 Jul 2011 13:57:21 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Eran Galperin's Blog: Last call for the Binpress programming contest]]></title>
      <guid>http://www.phpdeveloper.org/news/15905</guid>
      <link>http://www.phpdeveloper.org/news/15905</link>
      <description><![CDATA[<p>
<i>Eran Galperin</i> has posted a <a href="http://www.techfounder.net/2011/02/15/last-call-for-binpress-programming-contest/">last call</a> for entries into the <a href="http://www.binpress.com/contest">Binpress programming contest</a> with the final ten days looming on the horizon. 
</p>
<blockquote>
Have you been developing custom solutions for the web? pick your best feature, module or UI component that can be packaged and re-used and publish it on <a href="http://www.binpress.com/">Binpress</a>. Binpress is a marketplace for source-code, where developers can sell and buy source code from each other. We are looking for high-quality code from professional developers. If you think you have what it takes, please go over our <a href="http://www.binpress.com/contest/rules">submission guidelines</a> and <a href="http://www.binpress.com/contest/join">join the contest</a>.
</blockquote>
<p>
There's over $40,000 USD in prizes for the winners of the contest in categories for "best submission" and "best submission per language" (you can submit PHP, ASP.NET, Python, Java, Ruby or Javascript). 
</p>]]></description>
      <pubDate>Tue, 15 Feb 2011 08:50:04 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Binpress.com: Web Developer Programming Contest]]></title>
      <guid>http://www.phpdeveloper.org/news/15859</guid>
      <link>http://www.phpdeveloper.org/news/15859</link>
      <description><![CDATA[<p>
<a href="http://binpress.com">Binpress</a> has <a href="http://www.binpress.com/contest">announced a new contest</a> they've put together to try to find the best of the best programmers out there. The contest offers over $40,000 USD worth of prizes in three different categories going to the best code submitted to the Binpress site.
</p>
<blockquote>
Have you been developing custom solutions for the web? pick your best feature, module or UI component that can be packaged and re-used and publish it on Binpress. <a href="http://www.binpress.com/">Binpress</a> is a marketplace for source-code, where developers can sell and buy source code from each other. We are looking for high-quality code from professional developers.
</blockquote>
<p>
If you're interested, check out the <a href="http://www.binpress.com/contest/rules">submission guidelines</a> and or just jump in and <a href="http://www.binpress.com/contest/join">join the contest</a> with your own submission. The grand prize winner will receive a $17,000 USD award, second and third will receive $13,000 USD and the winners of the "best submission per language" awards will all receive $10,000 USD.
</p>]]></description>
      <pubDate>Fri, 04 Feb 2011 11:14:58 -0600</pubDate>
    </item>
  </channel>
</rss>

