Code Standards » History » Version 21
Amber Herold, 08/02/2011 11:37 AM
1 | 1 | Amber Herold | h1. Code Standards |
---|---|---|---|
2 | |||
3 | 21 | Amber Herold | When everyone uses the same coding style, it is much easier to read code that someone else wrote. That said, style is not important enough to enforce during a code review. It is much more important to ensure that best practices are followed such as implementing error handling . |
4 | 1 | Amber Herold | |
5 | 2 | Amber Herold | h2. Python |
6 | |||
7 | 14 | Amber Herold | * "Python Style Guide":http://www.python.org/dev/peps/pep-0008/ |
8 | * [[Python Coding Standards]] |
||
9 | * http://blog.dispatched.ch/2011/06/12/how-to-become-a-proficient-python-programmer/ |
||
10 | 17 | Amber Herold | * http://lucumr.pocoo.org/2011/7/9/python-and-pola/ |
11 | 2 | Amber Herold | |
12 | h2. PHP |
||
13 | |||
14 | 3 | Amber Herold | This one is a bit old, but lots of good stuff that goes beyond style. Some things are questionable. I prefer Getters/Setters over Attributes as Objects (at least how the example shows it) to allow for better error handling. I prefer no underscores in naming except for constants that use all caps...but that is only a style issue. |
15 | 2 | Amber Herold | |
16 | "PHP Coding Standard":http://www.dagbladet.no/development/phpcodingstandard/ |
||
17 | 4 | Amber Herold | |
18 | From the Zend framework folks: |
||
19 | http://framework.zend.com/manual/en/coding-standard.html |
||
20 | 5 | Amber Herold | |
21 | An intro: |
||
22 | http://godbit.com/article/introduction-to-php-coding-standards |
||
23 | 6 | Amber Herold | |
24 | Nice Presentation: |
||
25 | 7 | Amber Herold | http://weierophinney.net/matthew/uploads/php_development_best_practices.pdf |
26 | |||
27 | 8 | Amber Herold | PHP Unit testing |
28 | 6 | Amber Herold | http://www.phpunit.de/pocket_guide/ |
29 | 7 | Amber Herold | |
30 | For automatically checking code against the Pear standards use CodeSniffer: |
||
31 | http://pear.php.net/package/PHP_CodeSniffer/ |
||
32 | 10 | Amber Herold | |
33 | 20 | Amber Herold | Best Practices: |
34 | http://www.odi.ch/prog/design/php/guide.php |
||
35 | |||
36 | 13 | Amber Herold | h2. JavaScript |
37 | |||
38 | Improved performance: |
||
39 | http://blog.monitis.com/index.php/2011/05/15/30-tips-to-improve-javascript-performance/ |
||
40 | |||
41 | 10 | Amber Herold | h2. Any Language |
42 | |||
43 | 18 | Amber Herold | * "DRY principle":http://c2.com/cgi/wiki?DontRepeatYourself : Don't Repeat Yourself |
44 | * "Joomla guide":http://developer.joomla.org/strategy.html |
||
45 | * "OOP and starting point for PHP and Javascript specific OOP":http://nefariousdesigns.co.uk/archive/2006/05/object-oriented-concepts/ |
||
46 | * http://www.artima.com/weblogs/viewpost.jsp?thread=331531 |
||
47 | 15 | Amber Herold | |
48 | h2. Web performance best practices |
||
49 | |||
50 | 19 | Amber Herold | * "Googles Guide":http://code.google.com/speed/page-speed/docs/rules_intro.html |
51 | |||
52 | h2. Database |
||
53 | |||
54 | * http://codebalance.blogspot.com/2011/07/20-database-design-best-practices.html |