Neptune 1.0 Beta 1 Documentation: Code Formatting Conventions

Neptune Information

Download from RIA Forge

Code Formatting Conventions

Here are some conventions offered for coding in Neptune. None of these are required. They are offered here only as a suggested standard for Neptune code formatting such that any public Neptune programs might be as similar as possible to each other.

General

All indenting should be done with a single tab instead of any use of spaces. Code longer than a single line should be indented inside any tags except the following: CFFUNCTION, CF_TEMPLATE, CFQUERY.

All built in tags should be lower case, as should their attributes. All custom tags should have casing which matches the file names.

Method Ordering

The first method in a component should always be "init" if it exists. Any page controller should then have "loadData" if it exists. Any Records.cfc or ProgramManager.cfc component should end with "xml" if it exists.

Next, methods should be ordered by "access" in order of decreasing availability. Namely, in the following order: remote, public, package, private. Finally, methods should be sorted alphabetically.