- Problems Due to Lack of Standards
- Researching Existing Standards
- Enforcing Coding Standards
- Coding Standards Table of Contents
- Specific Coding Standards
Researching Existing Standards
With the propensity for changes in the industry to affect naming conventions, coding standards, and so on, many IT organizations are looking to industry leaders and the open source community for guidance. Because coding standards published by these organizations are likely to have been reviewed in light of the needs of a wide range of users (hopefully with greater insight into future industry developments), it's more likely that they'll meet the needs of your organization, contain fewer errors, not cause too many problems in the future, and cover eventualities that you have not even considered.
Following are some sample coding standards you might consider using on your projects:
Microsoft's naming guidelines for .NET programming.
The GNU project's set of coding standards for C development.
The International Trade Administration's suggested set of HTML coding standards.
Dan Short's article "The X(HTML) Files: Coding Standards Using XHTML" may be useful if you're writing XML/XHTML, especially if converting from HTML to XHTML.
This set of Java coding conventions from Sun is a bit out of date (revised April 20, 1999).
Netscape's Java coding conventions are great for simple Java code, but sooner or later you'll need more extensive Java coding standards for the J2EE component of your development. I wasn't able to find guidelines or standards on the web for Java Server Pages (JSPs), Enterprise Java Beans (EJBs), and so on, although there are a number of places where this issue is being discussed. One of the most interesting and useful I found was at TheServerSide.com.
Professional Java Server Programming J2EE Edition (Wrox, 2000) contains a chapter on JSP coding standards.
Of course, the comments in any Java code should always conform to the Javadoc specification.