Skip to content

Nomenclature

By leveraging these classes, you can effectively handle and parse various types of API responses within your application.

Nomenclature Guidelines for Variables, Functions, Classes, and Files

  1. Use Intention-Revealing Names: Choose names that convey the purpose or intent of the variable, function, class, or file.
  2. Avoid Disinformation: Do not use names that could mislead or confuse developers.
  3. Make Meaningful Distinctions: Ensure that names are distinct and meaningful, avoiding ambiguity.
  4. Use Pronounceable Names: Select names that are easy to pronounce and understand when spoken.
  5. Use Searchable Names: Choose names that are easy to search for within the codebase.
  6. Avoid Encodings: Refrain from adding prefixes or suffixes that encode additional information into names.
  7. Avoid Member Prefixes: Do not prefix variables or functions with unnecessary indicators of their scope or type.
  8. Avoid Mental Mapping: Opt for names that require minimal mental effort to understand their purpose.
  9. Naming Conventions for Classes and Objects:
    • Use noun or noun phrase names, such as Customer, Address, and AddressParser
    • Avoid verbs or non-descriptive terms like Manager, Data, or Info.
    • Class names should represent entities or objects within the system.
  10. Naming Conventions for Methods:
    • Use verb or verb phrase names for methods, like postPayment, deletePage, or save.
    • Accessors, mutators, and predicates should be prefixed with get, set, and is, respectively, and named for their value.
  11. Pick One Word per Concept: Maintain consistency by using a single term to represent each concept throughout the codebase.
  12. Avoid Pun: Refrain from using names that rely on wordplay or puns, as they can obscure meaning.
  13. Use Meaningful Naming for Files, Components, Directories, or Folders: Select names that accurately describe the contents or purpose of the item.