The following is list of requirements and recommendations of coding rules as to be used for domingo developers. The word must identicates a required rule, the word should identifies a recommentation.
All files are and must be encoded in UTF-8.
In non-XML files, all locale-specific characters must be properly encoded, especially in Java- and properties-files
The Java code format of domingo is based in the SUN specification with some extensions and restrictions. All required rules are documented in the checkstyle configuration files .
Donot use abbreviated names when ever possible for all Java
identifiers like local variables, parameters, fields or method names.
Use camel-case to concatenate seperate words.
E.g. a local variable holding a calendar entry should be named
calendarEntry
and not ce
There are a few exceptions for allowed abbreviations, because either they are commonly known and used or because the identifiers might get too long:
Unid
for universal-identifiere
for exceptionsstatic variables must be final and must be written in all upper-case
characters with an underscore as seperator, e.g. DEFAULT_LEVEL
.
Donot use an prefixes except for fields that should start with a small f
.
Parameters and local variables must not use any prefixes.
When ever possible, write JUnit tests for your code to ensure functionality in the current and all future releases.
There are three types of files in the test folder: