Coding guidelines

All OpenASelect software should be developed in compliance with the OpenASelect coding guidelines. These guidelines are based on the AmbySoft Coding Standards for Java. In addition all protected and public members and types should be provided with correct and understandable Javadoc comments.

Naming and documentation

The following items should be supplied with Javadoc:

  • Class, Enumeration and Interface declarations
  • All public and protected members

The following naming conventions apply:

  • Class variables start with a '_', with exception of javabean properties
  • Interface names start with 'I'
  • Abstract class names start with 'Abstract'
  • Variable prefixes may be used to increase readability of code. The following prefixes are used:
TypePrefixTypePrefix
booleanbBooleanbool
intiIntegerint
longlLonglong
floatfFloatfloat
doubledDoubledouble
charc
char[]caStrings
byteb
byte[]ba
Dated
Elementel
Exceptione
Filef
Hashtableht
InputStreamis
OutputStreamos
Propertiesprop
ResultSetrs
StringBuffersb
StringTokenizerst
URLurl
Vectorv
Enumerationenum
BufferedReaderbr

Formatting

Code formatting is performed by the code style and formatter functionality of the Eclipse IDE. The code templates and formatter settings are contained in the project settings of all OpenASelect software projects. In addition the code templates are attached to this document.

Member sequence

The following member sequence is used throughout classes:

  1. Static variables
  2. Public variables (discouraged)
  3. Protected varariables
  4. Private variables
  5. Public member functions
  6. Protected member functions
  7. Private member functions

Eclipse usage

The FIXME/TODO functionality, which is part of the Eclipse IDE, is used as follows:

  • ADD a "FIXME" comment for all issues which must be solved in the current version of the software
  • ADD a "TODO" comment for all issues which may be solved in the subsequent version of the software.
  • ADD a "DD" comment for all software design decisions

There should be no FIXME’s during integration of the software components. During the transition phase of the development all TODO’s should be gathered and documented in the Software Version Description (SVD).

Attachments

  • codetemplates.xml (2.8 kB) -OpenASelect coding guidelines, added by evb on 07/02/08 08:19:29.