PHP Coding standards

April 11th, 2010

Ever wondered why a developer is taking so much time to fix the code bugs ? Let me tell you as a coder who worked for a few years into this.
A project worked without any kind of standards, makes a developer sick to understand what business logic the code is following. The code has to be written in such a way that any other developer, should be able to take over the code at any point of time, relentlessly. There by making the code easier to maintain.
To cut-short this difficulties every language follows certain coding standards. Likewise PHP has some coding standards that are practiced widely.

PEAR standards can be used for those code, which is written for backward compatibility with PHP4
while Zend standards are written for PHP5 standards. If a code written in following these standards can be easily used to generate the code api documentation through code document software like phpDocumentor.

Having known to the above coding standards, make sure either when you start a project or move your project from one team to another, you announce to all developers who are involved in the project about the coding standards to be followed. There by it makes any developer to go in and out of the project easily. This makes a any new developer more comfortable to code than to sit and rather than sit and figure out what the code is written.

Also by make sure by doing a code review randomly, keeps the developer attentive towards the coding standards. This is not be taken in the negative sense to test the coder’s ability, but to make sure, your project goes right way, thereby leaving no chance of loop hole of getting permanently dependent on the one coder.

  • Blogger Post
  • Delicious
  • Digg
  • DZone
  • Facebook
  • Google Buzz
  • Google Bookmarks
  • Google Reader
  • LiveJournal
  • LinkedIn
  • Orkut
  • Ping
  • StumbleUpon
  • Reddit
  • Twitter
  • Technorati Favorites
  • WordPress
  • Share/Bookmark
 
5 visitors online now
5 guests, 0 members
Max visitors today: 6 at 06:44 pm UTC
This month: 6 at 09-08-2010 06:44 pm UTC
This year: 24 at 05-13-2010 01:03 am UTC
All time: 24 at 05-13-2010 01:03 am UTC