Changes between Initial Version and Version 1 of agilo/dev/Microarchitecture


Ignore:
Timestamp:
07/08/2010 09:40:04 AM (10 years ago)
Author:
mhaecker
Comment:

team rules

Legend:

Unmodified
Added
Removed
Modified
  • agilo/dev/Microarchitecture

    v1 v1  
     1 * Code is indented by 4 spaces
     2 * LongAndDescriptiveNames forMethodsAndVariables. Easy to understand, grep and change. Use conjugations of be for boolean returning methods.
     3 * Short Methods (aim for below 7 lines) longer than one screen -> you have to refactor it.
     4 * Model / Controller split: Everything that can go into the model should go there. (Controllers tend to get very big in SproutCore so combat that early and often). General rule of thumb: Put the Code where the data is that it it is acting upon.
     5 * Avoid sc-gen, it generates 90% crap and with the wrong filenames too.
     6 * Name sproutcore files to contain their roles (foo.js (model), foo_controller.js, foo_view.js, foo_test.js...)
     7 * File Size: < 500 == good, > 1000 == refactor
     8 * Use Guard clauses (main flow of method should not be indented)
     9 * Use whitespace to express logical grouping (and use {{{if ( _ ! _ foo)}}} to make it easier to spot the negation in conditions)
     10 * Constants first {{{if (undefined === foo)}}}

1.3.15 © 2008-2016 Agilo Software all rights reserved (this page was served in: 0.75796 sec.)