Created
February 9, 2012 02:08
-
-
Save wanghailei/1776502 to your computer and use it in GitHub Desktop.
Programming Conventions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1,使用Tab,不使用Space。Tab的宽度自由决定,默认为8个space的宽度。 | |
2,所有的程序注解使用英文,不出现中文。 | |
3,所有文件和文件夹的命名使用小写,使用名词。文件命名尽量使用一个单词;如果必须使用多个单词,单词间用_连接。文件夹命名必须使用一个单词。 | |
4,公共类库高于私有类库。(例如,JavaScript编程必须基于jQuery,基础类不继承自私有类库。) | |
5,通用编程模式高于私有编程模式。(例如:RESTful架构、MVC模式高于个人创立的模式) | |
6,标准文件和数据格式高于私有文件和数据格式。(例如:JSON高于自定义的文本格式) | |
7,任何情况下,简单高于复杂。 | |
8,通常情况下,结构高于效率。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment