Changes between Version 70 and Version 71 of DeveloperGuidelines/CodeConventions


Ignore:
Timestamp:
01/22/18 21:25:00 (4 years ago)
Author:
Dominic König
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DeveloperGuidelines/CodeConventions

    v70 v71  
    5555* Names for Eden-specific methods in subclasses of web2py classes also start with "s3_".
    5656* Names for Eden-specific subclasses of web2py classes and all classes which over-ride existing classes should have the suffix "S3".
    57 * All other classes defined in Eden start with "S3", e.g. S3Resource (a genuine Eden class) vs. AuthS3 (a subclass of a web2py class).
     57* S3Model subclasses in s3db should start with the all-uppercase module prefix, e.g. DVRCaseModel, PRImageModel (because the universal S3 prefix makes it harder to avoid name collisions between modules)
     58* S3Method subclasses in s3db must start with the all-lowercase module prefix, e.g. pr_Contacts (otherwise S3Model won't export them)
     59* All other classes defined in Eden start with "S3", e.g. S3Resource (a genuine Eden class) vs. AuthS3 (an Eden subclass of a web2py class).
    5860* Class names start with an uppercase letter.
    5961* CamelCase is for class names only.
     
    6163* everything else (including table names and field names) should be all-lowercase with underscores as word separator.
    6264* Names should be obvious and explicit, but not overly verbose (i.e. as long as they need to be to not make people think). They shouldn't require someone to look in another file or solve a puzzle to figure out what they mean, but shouldn't take too long to write. Avoid inventing new acronyms. e.g. bad: {{{ s3_prm_lkp, method_that_allows_us_to_create_a_gis_layer }}}, good: {{{ s3_personnel_search, create_gis_layer }}}
    63 
    6465=== Comments and Docstrings ===
    6566