The following guide lines are used for the Java source code of Sesame:
- Tabs are used for indentation
- Code doesn't extend further than column 110
- Comments do not extend further than column 80
- Classes, methods, variables, etc. are as private as
possible (but not to the level where it gets inconvenient). So,
variables that are only accessed by the class they're defined in are
private, methods used by subclasses are protected, etc. This keeps
the APIs as clear and minimal as possible, making it easier to
restructure a class internally. Making classes, methods, etc. more
public is safe and easy, the reverse is hard and potentially breaks
backwards compatibility.
- Class names start with an upper case letter (e.g.:
MyClassName), method- and variable names start with a lower case
letter (e.g. _name and getName()).
- Class-, method- and variable names that consist of more than
one word capitalize the first letter of each word, for example:
MyClassName, myMethod() and _myVariable. Words that are actually
abbreviations of names appear as-is, e.g.: XMLUtil, RDFParser and
SeRQLEngine.
- Names of constants (final variables) are in all-uppercase
letters.
- All source files start with a comment containing the standard
BSD-header and mentions the appropriate copyright holder(s).