Yesterday I started research into the current state of affairs with regard to coding standards for J2EE development. We are looking for an up to date set of low level (detailed) standards for at least the following categories/technologies:
- HTML, CSS, JavaScript
- JSP & JSTL
- Struts
- XML, XSLT, XSL-FO
- Core Java Programming
- Oracle Business Components for Java (BC4J)
- Oracle Toplink
- JHeadstart
- JDeveloper
- Ant, JUnit
The first queries on Internet were not unsuccessful! Some of the more interesting search results are listed below
The following document seems to include guidelines on almost all technologies in the Java arena that are of interest to us: Technical Paper: Java – J2EE, Conventions and Guidelines Release 1.0.2 Stephan Janssen The JCS Team (2004)
Java Coding Standards
Books
- The Elements of Java Style – Allan Vermeulen, Scott Ambler et. al. – Cambridge University Press – 2000 – ISBN 0 521 777682
- J2EE Design and Development, Chapter 4- Rod Johnson – Wrox – 2003 – ISBN 0 7645 4385 7
Internet resources
- Sun Java Code Conventions – the original set of coding standards (last update 1999)
- Java Coding Style Guidelines – NASA coding standards for Java (last update 2004)
- Doug Lea’s Coding Standards – standard document on standards; this document has been referenced in numerous successors (1999)
- AmbySoft Coding Standards for Java – among others the white paper that was the foudation for The Elements of Java Style (2000)
- Red Hat J2EE Engineering Standards – very pragmatical and accessible collection of best practices (2003)
- A programming style for Java – essay by Paul Haahr with personal observations and recommendations (last update 2001)
JavaScript Coding Standards
- Java Script Guidelines – Published on: Saturday 26th June 1999 By: Martin Webb
JSP Coding Standards
- Code Conventions for the JavaServer Pages Technology Version 1.x Language – Article on SUN site (2003)
Check out the Enerjy Code Analyzer http://www.enerjy.com
A best practice audit tool with nearly 200 rules taken from sources mentioned above
A general introduction on conding conventions that I wrote for my students can be found here. It has gone through many iterations, so is supposed to contain useful information by now 😉