Skip to content
acasimiro edited this page Aug 28, 2012 · 14 revisions

Here are the code conventions used in komoo project.
PLEASE FOLLOW THEM!

Naming

The golden rule on naming programming objects (i.e. classes, variables, styles, functions, etc.) using more generic components firsts. Where, namely, the components are: category > entity > action > id.

Examples:

  • class FormCommunity (category: Form > entity: Community)
  • #community_5
  • function community_reset()

Obs.: This is valid for code itself, but not for the folders structure, which are organized by flask blueprints (same idea as django like apps).

Languages

Python

  • Indendation: 4 spaces
  • Naming: PEP-8
  • Quotes: single is preferable than double

Coffeescript

  • Indendation: 2 spaces
  • Naming: namesWithMixedCase, ClassesWithCamelCases, CONSTANTS_WITH_UNDERSCORES
  • Quotes: single is preferable than double

HTML

  • Indendation: 2 spaces
  • Naming: name_with_underscores
  • Quotes: double is preferable than single

CSS

  • Indendation: 4 spaces
  • Naming: name_with_underscores
  • Quotes: single is preferable than double
Clone this wiki locally