Skip to content

Latest commit

 

History

History
45 lines (27 loc) · 1.18 KB

CODE_STYLE.md

File metadata and controls

45 lines (27 loc) · 1.18 KB

Code Style

This document describes the adopted standards for the code style:

  • Classes that implement the utility classes layer between Models and Controllers should be suffixed with 'Repo' (as in Repository Pattern)

Class Structuring

Classes structure is as follows:

class {
    companion object {
    }
    
    // Class variables go here
    
    // Overriden (inherited) methods go here
    
    // Public (non event-related) class methods go here
    
    // Private class methods go here
    
    // Public event-related methods go here
}

View naming

Views that are declared under XML should start with an acronym that represents the view type, so to make it easy to identify the view type in code. Example, a TextView would be called tv_name .

Package Structure rules

  • helper : This package will contain helper classes that abstract some behavior for a specific component, but that need to reference the class that contains them or some object inside that class.
  • manager : Globally accessible singletons that are used throughout the app to control state.
  • repo : Repository classes.