Developers Standards

From Zen Cart(tm) Wiki
Revision as of 00:08, 31 December 2005 by Wilt (talk | contribs)
Jump to: navigation, search

Zen Cart Coding Standards Currently I am using a mix of the pear/phpBB coding standards docs to provide the categories as below.


Currently, the standard is not to use hard tabs, and to use 2 spaces per indent.

My thoughts are this, regardless of whether you use tabs or spaces for indents, anything more than 2 spaces can quickly lead to indent hell. the argument then becomes whether indents should be hard tabs or soft spaces.

I have to say I prefer soft spaces. Unless someone can come up with a convincing argument otherwise,(this is mainly because the tab /t can be interpreted differently across OS's and editors, whereas a space is always interpreted the same whatever.

Control Structures

Function Calls

Function Definitions


Including Code

PHP Code Tags

Header Comment Blocks

Example URLs

Maning Conventions

Variable Names

Function Names

Class Names

Code Optimisations

SQL/SQL Layout

File Locations