Home > Apex-Code-Convention

Apex-Code-Convention

Apex-Code-Convention is a project mainly written in ..., it's free.

Coding Convention for Apex Programming language

Apex Coding Convention

Apex is a strongly-typed, object-oriented, proprietary programming language for the Force.com platform. It lets you execute flow and transaction control statements in conjunction with calls to the Force.com API. Apex borrows it's syntax from Java, and functions like a database stored procedure.

To learn more about Apex, read the developer documentation on the Force.com developer site.

Unfortunately, there is no official coding convention defined by Salesforce.com which the developers can follow to create Force.com applications. This has led to developers using random coding style. If the developer has a previous experience in another language they carry over the coding convention of that language to Apex. It's even more chaotic if they haven't used a programming language before. They just create their own coding style. This leads to inconsistency and becomes frustrating when you are reading an open source code or a code snippet in a blog post.

The aim of this document is to list a set of coding standards that can be used as a reference when developing applications on the Force.com platform. I was a Java developer in my previous life and these standards are heavily influenced by the official Java Coding Convention Some of the rules have been copied verbatim from this document.

Note: If you have any suggestions or improvements, feel free to fork this project, or create an issue, or email me anup[dot]jadhav[at]gmail.com.

Previous:TabBarDemo