Coding Standards
From Giews
- Code Conventions for the Java Programming Language
Why have code conventions? Code conventions are important to programmers for a number of reasons:
- 80% of the lifetime cost of a piece of software goes to maintenance.
- Hardly any software is maintained for its whole life by the original author.
- Code conventions improve the readability of the software, allowing engineers to understand new code more quickly and thoroughly.
- Please download the document from: Sun Java Coding Conventions
Fenix code format conventions:
- Java code line width is max 120
- Java comments line width is max 100
- Xml line width is max 120
Other:
- Use as much as possible generics in order to be more type safe. List<Resource> myList instead of just List myList.
- A lot of code in fenix-persistence can be moved to fenix-domain. The only responsibility of fenix-persistence is to talk to the database. Every other intelligent java stuff should be in fenix-domain, covered by unittests.
- The controllers in fenix-web do have as less as possible View definitions. Every View definition can go into the View like HorizontalPanel myPanel etc. All events are in the Controller and may add of course during an event new View definitions.

