<?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>Mon, 20 May 2013 08:04:36 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[PHPMaster.com: PSR-1 and PSR-2 to be Approved as Standards]]></title>
      <guid>http://www.phpdeveloper.org/news/17991</guid>
      <link>http://www.phpdeveloper.org/news/17991</link>
      <description><![CDATA[<p>
As is mentioned in <a href="http://phpmaster.com/psr-1-and-psr-2-to-be-approved-as-standards/">this new post</a> to PHPMaster.com, the PHP standards group is officially in the voting process on two new standards (<a href="https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md">PSR-0</a> being the first) setting up some standard development practices for PHP applications - <a href="https://github.com/pmjones/fig-standards/blob/psr-1-style-guide/proposed/PSR-1-basic.md">PSR-1</a> and <a href="https://github.com/pmjones/fig-standards/blob/psr-1-style-guide/proposed/PSR-2-advanced.md">PSR-2</a>.
</p>
<blockquote>
They initially started out as one proposal but the initial round of voting didn't yield a majority in favor. Participants did however see merit in various requirements the decision was made to split it into 2 proposals - one for mandatory interoperability and one for suggested style.
</blockquote>
<p>
The <a href="https://github.com/pmjones/fig-standards/blob/psr-1-style-guide/proposed/PSR-1-basic.md">PSR-1</a> standard proposes some basic coding standards (like namespacing structure and class/method naming definitions) and the <a href="https://github.com/pmjones/fig-standards/blob/psr-1-style-guide/proposed/PSR-2-advanced.md">PSR-2</a> standard covers similar things, but more in-depth with more recommendations. 
</p>
<p>
If you want to find out how your application stacks up against this new standard, you can try out <a href="https://github.com/fabpot/PHP-CS-Fixer">PHP-CS-Fixer</a> (from <i>Fabien Potencier</i>) to see how many things need an update.
</p>]]></description>
      <pubDate>Tue, 22 May 2012 13:18:40 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Satya Prakash's Blog: PHP is not Java]]></title>
      <guid>http://www.phpdeveloper.org/news/15503</guid>
      <link>http://www.phpdeveloper.org/news/15503</link>
      <description><![CDATA[<p>
On the Web Scripting Blog today, <i>Satya Prakash</i> has <a href="http://www.satya-weblog.com/2010/11/php-is-not-java.html">a reminder</a> for developers and those hiring them alike - PHP is not Java.
</p>
<blockquote>
I went for Interview and there interviewer asked me few questions. I disagreed on two questions and their answers. [...] After I disagreed [about parentheses being required on class creation] they said it is essential in new PHP version 5.2.x. Still I disagreed then he said, no no after PHP 5.2.x, PHP is like Java. [...] I like PHP and I do not want it to become Java. If just by implementing Object Oriented Programming PHP can become Java then I will say Java is C++ or Java copied C++.
</blockquote>
<p>
He proves his stance with a bit of sample code showing that the object creation doesn't require the parentheses to create.  
</p>]]></description>
      <pubDate>Mon, 29 Nov 2010 08:42:53 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[NETTUTS.com: 9 Confusing Naming Conventions for Beginners ]]></title>
      <guid>http://www.phpdeveloper.org/news/15330</guid>
      <link>http://www.phpdeveloper.org/news/15330</link>
      <description><![CDATA[<p>
On NETTUTS.com there's <a href="http://net.tutsplus.com/articles/general/9-confusing-naming-conventions-for-beginners/">a new article</a> that list nine different conventions that developers (PHP, Javascript, general web) could get confused about when they are just starting out.
</p>
<blockquote>
Especially when first getting started with various web development languages, it can prove to be a difficult task to learn all of the various naming conventions from language to language. This can be even more confusing when developers disagree on what's considered best practice. To help ease the transition for beginners, this list will describe some of the more common conventions.
</blockquote>
<p>
Some of the conventions that they mention that are more specific to PHP developers are underscores before property names, uppercase constants, capitalized first letters in variables and alternative syntax (like ternary).
</p>]]></description>
      <pubDate>Mon, 25 Oct 2010 11:39:42 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Paul Jones' Blog: Regarding Underscores]]></title>
      <guid>http://www.phpdeveloper.org/news/15314</guid>
      <link>http://www.phpdeveloper.org/news/15314</link>
      <description><![CDATA[<p>
In response to <a href="http://www.phpdeveloper.org/news/15297">a post</a> from <i>Leszek Stachowski</i> about underscores in PHP class development, <i>Paul Jones</i> has <a href="http://paul-m-jones.com/archives/1641">shared his own thoughts</a> on the matter - that he disagrees with <i>Leszek</i> and suggests keeping the underscore prefix for private methods.
</p>
<blockquote>
I think the underscore-prefix for protected and private is a good convention to keep. As with many things about programming, this convention is not for the program, it is for for the programmer. For example, <a href="http://paul-m-jones.com/archives/276">limiting your line length to about 80 characters</a> is a good idea, not for reasons of "tradition", but because of cognitive limitations of human beings who have to read code. Likewise, using the underscore prefix is an immediate and continuous reminder that some portions of the code are not public. Its purpose is as an aid to the programmer. 
</blockquote>
<p>
He suggests that it offers something similar to the thought process behind the magic methods like __get or __set that both work on a private scope. Check some of <a href="http://paul-m-jones.com/archives/1641#comments">the comments</a> for opinions both for and against the idea from other community members.
</p>]]></description>
      <pubDate>Thu, 21 Oct 2010 10:47:25 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Francois Zaninotto's Blog: Introducing Code Usability]]></title>
      <guid>http://www.phpdeveloper.org/news/12460</guid>
      <link>http://www.phpdeveloper.org/news/12460</link>
      <description><![CDATA[<p>
<i>Francois Zaninotto</i> has <a href="http://totalusability.posterous.com/introducing-code-usability">a recent post</a> looking at something every developer should consider when creating their applications - especially the libraries that might be used by other developers: code usability.
</p>
<blockquote>
Usability guidelines can sometimes be of use in awkward places. I try to apply them to source code. [...] Of course, coding guidelines are there to make the code easy to read by everyone. But code usability goes somehow beyond. Let's see some of the differences.
</blockquote>
<p>He compares good versus bad code in a few different areas:</p>
<ul>
<li>Bad Code Comments
<li>Split Up Code
<li>Cleanliness
<li>New Conventions
<li>Listen To User Feedback
</ul>
<p>
Each item is described, some including code examples to help make them more clear. Be sure to check out <a href="http://totalusability.posterous.com/introducing-code-usability#comments">the comments</a> for more good suggestions.
</p>]]></description>
      <pubDate>Tue, 05 May 2009 13:48:19 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Shawn Straton's Blog: Code Readability Part 2, Code Structure]]></title>
      <guid>http://www.phpdeveloper.org/news/11767</guid>
      <link>http://www.phpdeveloper.org/news/11767</link>
      <description><![CDATA[<p>
<i>Shawn Straton</i> has <a href="http://www.shawnstratton.info/code-readability-part-2-code-structure">posted the second part</a> of his look at code readability today. This time the focus is on the structure of the code - file structure, code layout, etc.
</p>
<blockquote>
I've had the pleasure of
maintaining a legacy application developed by people who were past
deadline the second they had their assignment handed to them in the
past and it can get really interesting rather quickly when you see
how sloppy you can get when you are in such a hurry. Here are some
guidelines I've given myself to ensure that the structure is correct
at the end of the day.
</blockquote>
<p>Some of his suggestions include:</p>
<ul>
<li>Breaking larger files apart into smaller, easier to maintain pieces
<li>Correctly naming functions/variables/etc 
<li>Tabbing/spacing in to indent code blocks
<li>Input validation and error checking should always be included
</ul>]]></description>
      <pubDate>Mon, 19 Jan 2009 12:59:41 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Keith Casey's Blog: Useful Naming Conventions]]></title>
      <guid>http://www.phpdeveloper.org/news/11538</guid>
      <link>http://www.phpdeveloper.org/news/11538</link>
      <description><![CDATA[<p>
In a <a href="http://CaseySoftware.com/blog/useful-naming-conventions">new post</a> to his blog <i>Keith Casey</i> shares a few tips on naming conventions that can help increase readability in your code and make maintenance simpler in the future.
</p>
<blockquote>
In my regular web wanderings recently, I found a great post entitled "<a href="http://www.gameproducer.net/2008/11/11/the-7-worst-verbs-programmers-use-in-function-calls/">The 7 Worst Verbs Programmers Use In Function Calls</a>" and couldn't help but be reminded of a system that I worked on a few years ago.  The core function of the system was named - no kidding - "doStuff".  Everything in the application led towards that, used it, and then did other things as a result.
</blockquote>
<p>
He suggests a structure he uses - "verbAjectiveNounStructure". Starting with an action, moving to a description of the action, to the target of the action and finally an optional structure - how the returned data is formatted.
</p>]]></description>
      <pubDate>Tue, 09 Dec 2008 15:31:15 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Chris Hartjes' Blog: Dynamic Models in CakePHP 1.2]]></title>
      <guid>http://www.phpdeveloper.org/news/10772</guid>
      <link>http://www.phpdeveloper.org/news/10772</link>
      <description><![CDATA[<p>
In <a href="http://www.littlehart.net/atthekeyboard/2008/08/05/dynamic-models-in-cakephp-12/">this new post</a> to his blog <i>Chris Hartjes</i> mentions a "nifty little feature" that the latest version of the <a href="http://www.cakephp.org">CakePHP framework</a> has - dynamic models.
</p>
<blockquote>
By default now, Cake will automatically use the AppModel class and create a unique alias to a database table if it does not find the file. This means that if you have a table that follows the Cake conventions, needs no validation, and has no associations to other tables, you don't even have to create the model file any more. Woah, talk about a serious time saver in some cases. 
</blockquote>
<p>
He also mentions a gotcha to keep an eye out for - misspelling the model name when you use it. It'll definitely break things. You can find out more about models in CakePHP from <a href="http://book.cakephp.org/view/66/models">this section</a> in their manual, The Cookbook.
</p>]]></description>
      <pubDate>Wed, 06 Aug 2008 09:34:33 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Yet Another Web Development Blog: Dear PHP, I think it's time we broke up.]]></title>
      <guid>http://www.phpdeveloper.org/news/6935</guid>
      <link>http://www.phpdeveloper.org/news/6935</link>
      <description><![CDATA[<p>
As anyone that's worked with a programming language for a long time knows, you get to know the ins and outs of it pretty well. You get a good feel for how it all works and how feel confident in your skills with it. But what happens if you decide to move on and leave the relationship? Check out <a href="http://blog.rightbrainnetworks.com/2006/12/18/dear-php-i-think-its-time-we-broke-up/">this take</a> on just such a situation from the Yet Another Web Development Blog.
</p>
<blockquote>
We've been together for about five years now. I've had a lot of good times and I've really enjoyed being with you. However, the more we work together, the more concerned I get about our future. I'm sorry, but you don't have the elegance that inspires me to want marry you. I think it's time we broke up.
</blockquote>
<p>
Some of the <a href="http://blog.rightbrainnetworks.com/2006/12/18/dear-php-i-think-its-time-we-broke-up/">reasons given</a> for moving on is PHP's seeming identity crisis, consistency in function names/functionality, and performance issues that were just too much. 
</p>
<p>
Despite being a bit anti-PHP, it's still a well-written piece. <a href="http://blog.rightbrainnetworks.com/2006/12/18/dear-php-i-think-its-time-we-broke-up/">Check it out</a>...
</p>]]></description>
      <pubDate>Tue, 19 Dec 2006 11:56:00 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Community News: OgoProject Wants to Clean Up PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/6842</guid>
      <link>http://www.phpdeveloper.org/news/6842</link>
      <description><![CDATA[<p>
There are some PHP developers out there that see PHP as a sort of constant "work in progress" with issues all around - confusing function names, non-intuitive features, and more. So, a group has been formed to help clean things up a bit - the <a href="http://www.ogoproject.com/">ogoproject</a>.
</p>
<blockquote>
The ogo project aims to clean up PHP, starting with fixing the inconsistent (and difficult to remember) function names. PHP needs clear naming conventions, and it needs to stick to them. We will offer a temporary fork until function name changes are agreed on, and sensible backwards and forwards compatibility is in place. Then we can get our changes merged into the main branch.
</blockquote>
<p>
They've already posted some suggestions for a few things, including <a href="http://www.ogoproject.com/pages/conventions">conventions they're looking to follow</a> and <a href="http://www.ogoproject.com/functions/">a list of new function names</a> changed according to these new conventions. There's also a <a href="http://www.ogoproject.com/pages/downloads">downloads</a> and <a href="http://www.ogoproject.com/pages/soon">forum</a> section that will soon have content.
</p>
<p>
If you're interested in getting involved, stop by the #ogoproject channel on the <a href="http://www.freenode.org">Freenode</a> IRC network and see what's going on.
</p>]]></description>
      <pubDate>Thu, 07 Dec 2006 07:53:00 -0600</pubDate>
    </item>
  </channel>
</rss>
