Update:Archive/2.0/Developers/Best Practices: Difference between revisions
Line 2: | Line 2: | ||
== Introduction == | == Introduction == | ||
The purpose of this section is to define code style and methodology to ensure consistency throughout the project. | |||
== Coding Standards == | == Coding Standards == |
Revision as of 18:59, 21 January 2005
Update: Home Page » Development »
Introduction
The purpose of this section is to define code style and methodology to ensure consistency throughout the project.
Coding Standards
Coding standards should be chosen, not argued about.
We have the responsibility to ensure consistency across the project, which is the primary goal behind establishing a set of guidelines for development.
Not many PHP projects have been undertaken under the Mozilla umbrella. There is no precedent for PHP, so it is in our best interests to choose a widely accepted standard for PHP programming.
By choosing a widely accepted PHP standard, we take a step in the right direction regarding readability, extensibility, ease of development, etc. Most people in the PHP community will be familiar with the syntax, making future developers feel 'at home' when they jump on board.
With the understanding that the Mozilla style guide (which is an interim guide and "not set in stone") recommends 2-space indentation (and items such as a modeline for EMACS), it is still in the best interests of the project to choose the PEAR Coding Standards as our primary style guide.
An additional constraint is the need for an 80 column limit on line length.
More information will be added regarding coding methods and appliation structure at a later date.