Difference between revisions of "Developers Standards"

From Zen Cart(tm) Wiki
Jump to: navigation, search
m
Line 63: Line 63:
  
 
== Miscellaneous ==
 
== Miscellaneous ==
 +
 +
 +
 +
[http://www.online-casino-wiki.com/index.php/online_casino_directory online casino directory]
 +
[http://www.magical-casino.com/games_variations.html Casino Games and variations.]
 +
[http://www.casino-theory.com/online-casino-royale/strategy-online-casino.html strategy online casino]
 +
[http://www.casino-games-wiki.com/index.php/casino_games_rules casino games rules]
 +
[http://www.magical-casino.com/casino_games.html Casino games.]
 +
[http://www.casino-theory.com/online-casino-bonus/index.html online casino bonus]
 +
[http://www.casino-theory.com/bingo-online/gambling-online-bingo.html gambling online bingo]
 +
[http://www.casinos-go.com/online-casino-tips/online-casino-games.html online casino games]
 +
[http://www.casino-theory.com/online-casino-bonus/index.html online casino bonus]
 +
[http://www.slots-wiki.com/index.php/online_slots online slots]

Revision as of 19:49, 17 November 2006

Zen Cart™ Coding Standards

Currently the Zen Cart™ Team is using a mix of the pear/phpBB coding standards docs to provide the categories as below.


The coding standards posted here are what we strive for. They are not a definition of how code is currently written. So, if the code you get does not match posted standards, don't be suprised. It's a long and arduous battle to convert all core code.


Indentation

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


The Zen Cart™ Team's thoughts are that regardless of whether you use tabs or spaces for indents, anything more than two spaces can quickly lead to indent hell. The argument then becomes whether indents should be hard tabs or soft spaces.


Soft spaces are preferred, unless someone can come up with a convincing argument otherwise (mainly because the tab /t can be interpreted differently across OS's and editors, whereas a space is always interpreted the same).


Control Structures

Function Calls

Function Definitions

Comments

Including Code

PHP Code Tags

Never use short open tags <? or asp tags <%; always use the full <?php ?> tags.


Header Comment Blocks

Example URLs

Naming Conventions

Variable Names

Function Names

Class Names

Code Optimisations

SQL/SQL Layout

File Locations

Miscellaneous

online casino directory Casino Games and variations. strategy online casino casino games rules Casino games. online casino bonus gambling online bingo online casino games online casino bonus online slots