Development Best Practices
  • Home
  • Clean Code
  • Apex
    • Naming Conventions
    • Triggers
    • Unit Testing
    • Principles
      • KISS
      • DRY
      • Single Responsibility
      • Open/Closed
      • YAGNI
    • Patterns
    • SOQL
    • Exception Handling
    • Magic Strings
  • Lightning Components
    • Aura
    • LWC
  • Automation
    • Process Builder
  • Salesforce DX and VSCode
  • Git Source Control
    • Install Git
    • Using Git
    • Development Workflow
      • The Rules
    • Feature Branch Workflow
Powered by GitBook
On this page
  • Apex Classes
  • Apex Methods
  1. Apex

Naming Conventions

Having a ‘Naming convention’ reduces the effort needed to read and understand source code, which eventually give us following benefits:

  • Improved Communication — “The best code communicates itself” . Any member of a development will be able to read and understand the code of another member through code.

  • Improved Code integration — Distinct teams that rely on the code built by other teams won’t have problem understanding properly named interface and its entities.

  • Improved Consistency — Helps formalise expectations and promote consistency within a development team.

  • Improved clarity — Provides better understanding in case of code reuse after a long interval of time. Enhances clarity in cases of potential ambiguity.

Apex Classes

Use Pascal Case MyClass

Apex Methods

Use Camel Case: First letter of each word is capitalised, except the first word.

getProducts

PreviousApexNextTriggers

Last updated 5 years ago