This Confluence has been LDAP enabled, if you are an ASF Committer, please use your LDAP Credentials to login. Any problems file an INFRA jira ticket please.

Child pages
  • Coding Conventions

Access to add and change pages is restricted. See:

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 11 Next »

General Formatting Conventions

The Open For Business projects follows the Sun coding standards for Java source code.
For information regarding this standard please visit

In accordance with this standard we use 4 space indention rather than tabs, and set the tab size to 8 spaces to make code with tabs easier to pick out. Make sure no code contains tab characters.
For XML/HTML/FTL files we follow the standard XML/HTML/FTL format (TODO: add link to a reference here); as well as use 4 space indention rather than tabs (note some HTML/FTL files may use 2 spaces instead of 4, but they should all really use 4 spaces).

HTML code should be XHTML compliant.

BSH files should follow the same convention as Java files.

Entity Definitions

TODO: entity names (including maximum length)
Database table names should never be longer than 30 characters. Since database table names are are generated by the system by applying the Java naming convention of constants to the entity names.
For example: the name FinancialsImportProductInventory is transformed into the database table name FINANCIALS_IMPORT_PRODUCT_INVENTORY, that exceeds the maximum length of 30 characters and so it is not a good choice.

TODO: field names, pk/fk names (including maximum length)

TODO: view-entity names and conventions 

Service Definitions

Best Practices

License Headers

Each and every source file should contain the ASL2.0 header:

Naming Conventions for Artifacts and controller entries

TODO: controller's request and view naming conventions

TODO: conventions for screen names (top-level screens, included screens, decorators)

TODO: conventions for form names 

TODO: conventions for menu names

TODO: conventions for artifacts names such as ftl templates and bsh scripts

  • No labels