Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Names representing types must be nouns and written in mixed case starting with upper case. E.g., StoragePool
  2. Variable names must be in mixed case starting with lower case, E.g., virtualRouter
  3. Names representing constants (final variables) must be all uppercase using underscore to separate words. E.g., MAX_TEMPLATE_SIZE_MB
  4. Names representing methods must be verbs and written in mixed case starting with lower case. E.g., copyTemplateToZone
  5. Abbreviations and acronyms should not be uppercase when used as name. E.g., startElbVm
  6. Private class variables should have underscore prefix. E.g., _downloadTimer. Exception: Transfer Objects (TOs), Database objects (VOs), Command objects:- private class variables in these classes have no underscores. The exception is justified since these are usually logged and are more readable without underscores.
  7. Static variables are prefixed with s_. E.g., s_logger
  8. is prefix should be used for boolean variables and methods. E.g., isFinished
  9. Exception classes should be suffixed with Exception.
  10. Default interface implementations can be prefixed by Default or if intended to be subclassed, suffixed by Base. E.g., DefaultExternalNetworkElement or NetworkElementBase
  11. There are various naming conventions used to convey the design patterns common in Cloudstack, listed in the Appendix.
  12. Object Naming Convention and guidelines for logs, API description, documentation and comments, refer to Object Naming and Title Case Convention

Files, Layout and whitespace

...