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
- Use Intention-Revealing Names: Choose names that convey the purpose or intent of the variable, function, class, or file.
- Avoid Disinformation: Do not use names that could mislead or confuse developers.
- Make Meaningful Distinctions: Ensure that names are distinct and meaningful, avoiding ambiguity.
- Use Pronounceable Names: Select names that are easy to pronounce and understand when spoken.
- Use Searchable Names: Choose names that are easy to search for within the codebase.
- Avoid Encodings: Refrain from adding prefixes or suffixes that encode additional information into names.
- Avoid Member Prefixes: Do not prefix variables or functions with unnecessary indicators of their scope or type.
- Avoid Mental Mapping: Opt for names that require minimal mental effort to understand their purpose.
- 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.
- 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.
- Pick One Word per Concept: Maintain consistency by using a single term to represent each concept throughout the codebase.
- Avoid Pun: Refrain from using names that rely on wordplay or puns, as they can obscure meaning.
- Use Meaningful Naming for Files, Components, Directories, or Folders: Select names that accurately describe the contents or purpose of the item.
CHAT SAMMIAT