Author: buildbot
Date: Thu Apr 19 09:41:30 2012
New Revision: 813633
Log:
Staging update by buildbot for ace
Modified:
websites/staging/ace/trunk/content/ (props changed)
websites/staging/ace/trunk/content/dev-doc/coding-standards.html
Propchange: websites/staging/ace/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Thu Apr 19 09:41:30 2012
@@ -1 +1 @@
-1327884
+1327889
Modified: websites/staging/ace/trunk/content/dev-doc/coding-standards.html
==============================================================================
--- websites/staging/ace/trunk/content/dev-doc/coding-standards.html (original)
+++ websites/staging/ace/trunk/content/dev-doc/coding-standards.html Thu Apr 19
09:41:30 2012
@@ -634,72 +634,56 @@
</ul>
<h3 id="namingconventions">Naming conventions</h3>
<p>Naming conventions make programs more understandable by making them easier
to read. They can also give information about the function of the
identifier.</p>
-<table>
-<thead>
-<tr>
-<th>Identifier Type</th>
-<th>Rules for Naming</th>
-<th>Examples</th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td>(inner) classes, interfaces, enums and annotations</td>
-<td>Names should be nouns, in mixed case with the first letter of each word
capitalised. Try to keep your names simple and descriptive. Use whole words and
avoid acronyms and abbreviations.</td>
-<td>class Raster;\class TreeFrame;</td>
-</tr>
-<tr>
-<td>interfaces</td>
-<td>Like class names, but if there is a name clash, the interface wins.</td>
-<td>Repository</td>
-</tr>
-<tr>
-<td>services</td>
-<td>Same as interfaces, so don't append "Service" as you usually do not know
if an interface is a service or not.</td>
-<td>-</td>
-</tr>
-<tr>
-<td>implementation classes</td>
-<td>If a class implements an interface, it should use the name of the
interface as part of its name, adding something specific for this
implementation to it, or Impl if that does not make sense.</td>
-<td>class FileBasedRepository implements Repository; \class VersionServlet
implements HttpServlet;</td>
-</tr>
-<tr>
-<td>exceptions</td>
-<td>Like class names; always ending in "Exception"</td>
-<td>InputException</td>
-</tr>
-<tr>
-<td>methods</td>
-<td>Methods should be verbs in mixed case with the first letter lowercase.
Within each method name capital letters separate words. Property methods or
get-set methods are used as follows:</td>
-<td></td>
-</tr>
-<tr>
-<td>When a method is used to get a value start the method name with 'get'.
When a method is used to set a value start the method name with 'set'.</td>
-<td>run(); \runFast(); \setBackground();</td>
-<td></td>
-</tr>
-<tr>
-<td>variables (except for (constant) static final variables and member
variables)</td>
-<td>All variables are in mixed case with a lowercase first letter. Words are
separated by capital letters.</td>
-<td>int index;\float myWidth;</td>
-</tr>
-<tr>
-<td>member variables</td>
-<td>The same capitalisation as for normal variables prefixed with 'm_'.</td>
-<td>int m_index;\float m_myWidth;</td>
-</tr>
-<tr>
-<td>constant (static final) variables, enum names</td>
-<td>Names should be all uppercase with words separated by underscores
("_").</td>
-<td>public static final int BLACK = 99;</td>
-</tr>
-<tr>
-<td>packages</td>
-<td>Lowercase only; avoid lengthy package names; always start with
org.apache.ace.</td>
-<td>org.apache.ace.demo.bundle</td>
-</tr>
-</tbody>
-</table>
+<dl>
+<dt><strong>(inner) classes, interfaces, enums and annotations</strong></dt>
+<dd>Names should be nouns, in mixed case with the first letter of each word
capitalised. Try to keep your names simple and descriptive. Use whole words and
avoid acronyms and abbreviations.<br/>
+Examples:<br/>
+<code>class Raster</code><br/>
+<code>class TreeFrame</code></dd>
+<dt><strong>interfaces</strong></dt>
+<dd>Like class names, but if there is a name clash, the interface wins.<br/>
+Example:<br/>
+<code>interface RemoteRepository extends Repository</code></dd>
+<dt><strong>services</strong></dt>
+<dd>Same as interfaces, so don't append "Service" as you usually do not know
if an interface is a service or not.<br/>
+Example:<br/>
+<code>interface ConnectionFactory</code></dd>
+<dt><strong>implementation classes</strong></dt>
+<dd>If a class implements an interface, it should use the name of the
interface as part of its name, adding something specific for this
implementation to it, or <em>Impl</em> if that does not make sense.<br/>
+Examples:<br/>
+<code>class FileBasedRepository implements Repository</code><br/>
+<code>class VersionServlet implements HttpServlet</code></dd>
+<dt><strong>exceptions</strong></dt>
+<dd>Like class names; always ending in "Exception".<br/>
+Example:<br/>
+<code>InputException</code></dd>
+<dt><strong>methods</strong></dt>
+<dd>Methods should be verbs in mixed case with the first letter lowercase.
Within each method name capital letters separate words. Property methods or
get-set methods are used as follows:
+When a method is used to get a value start the method name with 'get'. When a
method is used to set a value start the method name with 'set'. When a method
returns a boolean start the method name with 'is'.<br/>
+Examples:<br/>
+<code>run();</code><br/>
+<code>runFast();</code><br/>
+<code>setBackground();</code><br/>
+<code>isOptional();</code></dd>
+<dt><strong>variables (except for (constant) static final variables and member
variables)</strong></dt>
+<dd>All variables are in mixed case with a lowercase first letter. Words are
separated by capital letters.<br/>
+Examples:<br/>
+<code>int index;</code><br/>
+<code>float myWidth;</code></dd>
+<dt><strong>member variables</strong></dt>
+<dd>The same capitalisation as for normal variables prefixed with 'm_'.<br/>
+Examples:<br/>
+<code>int m_index;</code><br/>
+<code>float m_myWidth;</code></dd>
+<dt><strong>constant (static final) variables, enum names</strong></dt>
+<dd>Names should be all uppercase with words separated by underscores
('_').<br/>
+Example:<br/>
+<code>public static final int MAX_LIMIT = 99;</code></dd>
+<dt><strong>packages</strong></dt>
+<dd>Lowercase only; avoid lengthy package names; always start with
<em>org.apache.ace</em>.<br/>
+Example:<br/>
+<code>package org.apache.ace.demo.bundle;</code></dd>
+</dl>
<h2 id="downloads">Downloads</h2>
<p>For various coding style checkers and IDE's we have configuration files
that support this style guide. You can download them from the list below:</p>
<ul>