Does an Apex or VisualForce code style guide exist?

Has anyone written an Apex or VisualForce code style guide, in the way of the Ruby Style Guide or jslint, or PEP-8, or any number of Java guides? I’m in the process on creating one for internal use but would love to base it off existing work, either by SFDC or a colleague.

In an ideal world, MavensMate and Eclipse can use the style guide for linting, but I’m happy with simply a programmer-readable textual version.

If no one has one and is considering employing one, would anyone be interested in collaborating?


I started on this style guide months ago, made it open source. I finally got it to v0.1.

The Apex guide is based on Google’s Java style guide as mentioned by Peter Knolle.

The Visualforce style guide does not yet exist.

The Salesforce admin style guide also does not yet exist.

The ant migration style guide does not exist, but I’m not sure it ought to.

Are there other aspects that I should consider?

Source : Link , Question Author : Charles Koppelman , Answer Author : Jackson Chen

Leave a Comment