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:
| Type | Prefix | Type | Prefix |
| boolean | b | Boolean | bool |
| int | i | Integer | int |
| long | l | Long | long |
| float | f | Float | float |
| double | d | Double | double |
| char | c | ||
| char[] | ca | String | s |
| byte | b | ||
| byte[] | ba | ||
| Date | d | ||
| Element | el | ||
| Exception | e | ||
| File | f | ||
| Hashtable | ht | ||
| InputStream | is | ||
| OutputStream | os | ||
| Properties | prop | ||
| ResultSet | rs | ||
| StringBuffer | sb | ||
| StringTokenizer | st | ||
| URL | url | ||
| Vector | v | ||
| Enumeration | enum | ||
| BufferedReader | br |
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:
- Static variables
- Public variables (discouraged)
- Protected varariables
- Private variables
- Public member functions
- Protected member functions
- 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).
External links
Attachments
- codetemplates.xml (2.8 kB) -
OpenASelect coding guidelines
, added by evb on 07/02/08 08:19:29.
