General Naming Conventions for Variable names

Attribute(s)

  • Naming Convention

    Description

    General Naming Conventions: Variable names must conform to the standards described in the Details field below.

    Motivation

    Variable names can be referenced almost anywhere in a Notes database. It is therefore vital that the variable name be recognizable to both developers and administrators. This requires a standard naming convention for variable names.

    Example / Details

    Variable names must conform to the following standards:

    A variable name may consist of letters, numbers and underscores.

    Variables that appear in different fields or scripts, but have the same
    function should also have the same name.

    Variables always begin with a capital letter. Each new word in a variable name
    should also begin with a capital letter.

    e.g.
    Incorrect
    Correct

    name
    Name

    lastname
    LastName

    Underscores may also be used to separate words in a variable name, but only
    where it is necessary for readability.

    e.g.
    Incorrect:
    Correct

    User_Name
    UserName

    User_Name_Disp
    UserName_Disp

    Do not use names of forms or other design elements as variable names.

    Temporary variables should be prefaced with a 'Tmp'. Temporary variables must
    still conform to other standards described here. Always place a short remark
    next to a temporary variable to explain what its function is.

    Variable names must be descriptive in nature so that a designer or
    administrator can quickly ascertain its function.

    e.g.
    Incorrect
    Correct

    FIELD_A
    UserNameLast

    Variable Names must be in English.

    Variable names should always be singular.