Skip to content

Coding conventions

DorianTs edited this page Apr 18, 2016 · 4 revisions
  • When openning new block of code with curly brackets, the openning bracket will be in a seperate line.
  • When we need to pass a function as an argument in some declaration(like new controller) we will implement the function inside the argument. In this case, the left curly bracket will be in the same line, attach to the function
  • Iterator variables for describing indexes (for, while) - use only the variables i,j,k
  • Variables name - starting always with lower case, if more than one word, each word starts with capital letter, example- discountManage, aToB
  • Between two unrelated big blocks of code (for example two different controllers), we will seperate between them with a space bar.
  • Keep of proper indention !!!
  • Document your code optimal as you can and describe the code comprehensivly. You are one of a group!!
  • The documentation will be wrriten one line above the relevant code.
  • When you document a function, keep this pattern - "Function gets X, doing Y, return Z"
  • Constants variables will be wrriten in uppercase only, separated with an underline. (GLOBAL_VAR)
  • Use only jQuery!
  • Assign css and js files in the head section
  • file names starts with lower case
Clone this wiki locally