Programming Guide Development for Java Bde (bde2java)
Programming Reference Guide Part III

Coding Standard for BDE2JAVA
1.0


91.523 - java2bde project - Fall '96
Win-Kin Au, Jie Li, Aditya Vedula, Li Fu Wang, Zhigang Wang, Guillermo Zeballos

University of Massachusetts, Lowell

(path:/nfs/remus/fac1/lechner/public_html/bde2java file:bde2javaCS.shtml)


These are the coding standards for usage in bde2java project development. They were derived by mutual consent and discussion by the bde2java team, 96f523.


1. Variables:

All variables are as defined in standard Java definition.

All variables must have descriptive names.

All variables need brief inline descriptive comments.


2. Constants:

All constant names should be capitalized.


3. Naming Conventions:

The following conventions apply to all naming situations unless otherwise specified or superseded by specific conventions defined in type description (i.e. Constants, Variables).

Abbreviations should be avoided whenever possible. It is recommended that some abbreviations be referenced from a table of standard abbreviations to maintain variable naming consistency when abbreviations are used.

Names should be descriptive of functional purpose.

All class naming must be preceded by the word "bde" in lower case. The first letter after "bde" should be capitalized. If the name is composed of multiple words, each first letter is respectively capitalized.


4. Code Documentation Conventions:

Code documentation refers to commentary to be contained within the code itself as both inline comments and as part of the javadoc build comments. This not a specification for other types of documentation (final reports, user guides, etc.).

4.1 In General

Comments must address the following:

4.2 Javadoc Specific


5. Coding Conventions:

All class and method definitions will contain the necessary javadoc build comments compatible with current java style documentation for java doc (as per previous section).

Standard indentation rules denoting bracket nesting should be practiced. The programmer should make an effort, however, to try to maintain the code to within 80 columns due to the difficulty in generating wide margin output.

Only one class should be defined per file. Files will need to be maintained in the file hierarchy as required by the java environment.

Code examples follow.


5.1 Header Block Example:

For Class description

/* ****************************************************************/
/**
*
*       Class: Class name 
*
*       Description: Text Description (per commenting requirements)
*/
/* *****************************************************************/

subsequent code...

For Method description (note slight indent)

   /* ****************************************************************/
   /**
   *
   *       Method:(public|private)(return value)(Method name)(parameter list)
   *
   *       Description: Text Description in full 
   *                    - pre & post conditions 
   *                    -side effects
   *
   *       State: any key state (control) variables
   *
   *       Class: Encapsulating Class name
   *
   *       @param parameter details
   *       @returnreturn values
   *       @exception error exception breaks
   */
   /* *****************************************************************/

subsequent code...

Consult the javadoc Development Report(Ref. Guide part IV) listed in section 4.2 for additional support and examples of the results from a properly formatted javadoc comment. [an error occurred while processing this directive]