Helma logo
helma.org » Home > development > Coding Conventions

Coding Conventions

Helma code tries to adhere to Sun's Java Code Conventions.

Code indentation is done in steps of 4 spaces. No tabs are used for indentation. There is no hard requirement to limit lines to 80 characters, since modern monitors and editors usually can handle a bit more than that. However, lines that clearly exceed that limit should be wrapped.

JavaDoc comments in Helma code are incomplete in some places. That doesn't mean we think that's a good thing. New code should at least contain basic JavaDoc comments for public classes and methods. Fixes for JavaDoc in existing code is always welcome.

Java souce files have a header containing a copyright notice, a link to the Helma license and a few CVS keywords that are expanded when checked in. You may want to add this to your editor's or IDE's templates, if it offers this feature.

/*
 * Helma License Notice
 *
 * The contents of this file are subject to the Helma License
 * Version 2.0 (the "License"). You may not use this file except in
 * compliance with the License. A copy of the License is available at
 * http://adele.helma.org/download/helma/license.txt
 *
 * Copyright 1998-2003 Helma Software. All Rights Reserved.
 *
 * $RCSfile$
 * $Author$
 * $Revision$
 * $Date$
 */
We're not religous about explicit imports vs. wildcard import statements. If you use more than a handfull of classes from one package, using a wildcard import statement is usually more convenient than having one screenful of just imports. Usually, this is a matter of practical considerations.

If we forgot anything, feel free to ask on the Helma development list.


Up: Helma Project Resources
Previous: Helma Documentation

... comment


Page last modified on 2003-07-31 16:34 by hns