# Apex Style Guide
Naming convention:
- Lower Camel Case: Variables
- Upper Camel Case: Classes and methods
Class, Variable, and Method Declarations
-
```
public class MyClass{
public Type publicVariable;
Type privateVariable { get; set; }
// DoFunction() description here
public void publicMethod(){
// code to be executed
}
// privateMethod() description here
// param1: description
// return: description
String privateMethod(String param1){
// code to be executed
return "someString";
}
}
```
Note:
- Variable declarations clumped together
- One empty line before ending a code block
<br/>
Control Statements
-
Refer to [Javascript Style Guide](https://hackmd.io/8NvumSgkRA29Azga37eEeQ)
# Triggers
Note:
- Trigger best practices should be followed throughout, including but not limited to removing all business.
- Logic from the trigger itself. Logic should be placed a handler class.
# Header
Classes should have a header with the name of person who created the class and a description of what the class does
```
/////////////////////////////////////////////////////
//
// Name: Some Class
// Author: Some Author
// Description: some Description
//
///////////////////////////////////////////////////
```