As you all know many people use their own standards when they develop code. Some use spaces others use tabs, some place many "1 liners" others strike it over several lines.
We will provide the rules including examples and why we do it.
We use tabs instead of spaces for a visual view of the 'depth' of the created code.
<?php first level{ second level { 3rd level { } } }
The reason is simple. Some coders like a spacing of 2, others 4 and common is 8 spaces. By using tabs the designer can easily make the code viewable to his preferences since many editors have a 'tab spacing' option to set this up. A small nice benefit is that it makes the code smaller (8 spaces = 8 bytes, 1 tab = 1 byte)
1-liners
We allow them in a few ways to easy-up the code in certain non-complex circumstances. For example "$a ? $a : $b" to replace "if ... else ...".
As you can see "} else {" is also a 1-liner since many people split this up on single lines as well.
We mostly use this one as well unless the code becomes hard to read and then we use the following (mostly in "do ... while" and "switch")
We use the common version standard, but slightly modified in some more detail as described in the Versioning System document.
Secondly we urge you as theme/module/add-on developers to use the same version scheme to provide you a more powerful integration through Dragonfly. Some of these integrations are "update recognition" and "theme upgrading (since 9.1.x)".
Updated: Friday, February 29, 2008 (12:48:21) by NanoCaiordo Created: Tuesday, November 29, 2005 (02:44:47) by DJMaze
All content of this website is copyrighted by the Creative Commons NC-SA
The logos and trademarks used on this site are the property of their respective owners We are not responsible for comments posted by our users, as they are the property of the poster. Our server runs on a P3 1.2GHz with 512MB RAM with no accelerators
This page generated in 0.4257 seconds with 12 DB Queries in 0.016 seconds Memory Usage: 1.48 MB
Interactive software released under GNU GPL,
Code Credits,
Privacy Policy