Style Guides
Summary
Also known as Programming Styles and Coding Conventions, style guides are sets of rules used by developers to ensure consistent formatting and organization of their code.
Purpose
A style guide or style manual is a set of standards for the writing and design of code. The implementation of a style guide provides uniformity in code style and formatting, often covering guidelines regarding indentation (tabs vs. spaces), variable and function naming conventions, where best to apply whitespace and so on.[1]
Style guides ensure consistent formatting and organization of their code. Some Style Guides may also include a Naming Convention which is a set of rules for choosing the character sequence to be used for identifiers which denote variables, types and functions etc. in source code and documentation.[2]
Naming Conventions[2]
- UpperCamelCase : with the first letter of every word capitalized
- lowerCamelCase : with the first letter lowercase and the first letters of subsequent words in uppercase
- UPPERCASE : with all letters in uppercase, separated by an underscore (_) or a dash (-)
- lowercase : with all letters in lowercase, separated by an underscore (_) or a dash (-)
- Hungarian Notation : with type prefix, see http://en.wikipedia.org/wiki/Hungarian_notation
Common Style Guides
JavaScript[1]
- idiomatic.js
- jQuery Core Style Guide
- Google JavaScript Style Guide
- Dojo Style Guide
- Aloha Editor JavaScript Style Guide
- Crock’s Code Conventions for JavaScript
Html/Css[3]
- Google HTML/CSS Style Guide
- Idiomatic Css
- Css Wizardry Style Guide
- ThinkUp
- Wordpress Css Coding Standards
- ↑ 1.01.1 JavaScript Style Guides And Beautifiers, by Addy Osmani.
- ↑ 2.02.1 Naming Convention, on Wikipedia.
- ↑ Css Style Guides, by Chris Coyer.