Author: jawi
Date: Thu Apr 19 09:41:15 2012
New Revision: 1327889

URL: http://svn.apache.org/viewvc?rev=1327889&view=rev
Log:
CMS commit to ace by jawi

Modified:
    ace/site/trunk/content/dev-doc/coding-standards.mdtext

Modified: ace/site/trunk/content/dev-doc/coding-standards.mdtext
URL: 
http://svn.apache.org/viewvc/ace/site/trunk/content/dev-doc/coding-standards.mdtext?rev=1327889&r1=1327888&r2=1327889&view=diff
==============================================================================
--- ace/site/trunk/content/dev-doc/coding-standards.mdtext (original)
+++ ace/site/trunk/content/dev-doc/coding-standards.mdtext Thu Apr 19 09:41:15 
2012
@@ -428,19 +428,54 @@ Blank spaces should be used in the follo
 
 Naming conventions make programs more understandable by making them easier to 
read. They can also give information about the function of the identifier.
 
-Identifier Type                                    | Rules for Naming | 
Examples
--------------------------------------------------- | ---------------- | 
------------
-(inner) classes, interfaces, enums and annotations | 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. | class Raster;\\class TreeFrame;
-interfaces                                         | Like class names, but if 
there is a name clash, the interface wins. | Repository
-services                                           | Same as interfaces, so 
don't append "Service" as you usually do not know if an interface is a service 
or not. | -
-implementation classes                             | 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. | class FileBasedRepository implements Repository; \\class 
VersionServlet implements HttpServlet;
-exceptions                                         | Like class names; always 
ending in "Exception" | InputException
-methods                                            | 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'. | run(); 
\\runFast(); \\setBackground();
-variables (except for (constant) static final variables and member variables) 
| All variables are in mixed case with a lowercase first letter. Words are 
separated by capital letters. | int index;\\float myWidth;
-member variables                                   | The same capitalisation 
as for normal variables prefixed with 'm_'.|int m_index;\\float m_myWidth;|
-constant (static final) variables, enum names|Names should be all uppercase 
with words separated by underscores ("_"). | public static final int BLACK = 99;
-packages                                           | Lowercase only; avoid 
lengthy package names; always start with org.apache.ace. | 
org.apache.ace.demo.bundle
+**(inner) classes, interfaces, enums and annotations**
+:   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/>
+    `class Raster`<br/>
+    `class TreeFrame`
+**interfaces**
+:   Like class names, but if there is a name clash, the interface wins.<br/>
+    Example:<br/>
+    `interface RemoteRepository extends Repository`
+**services**
+:   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/>
+    `interface ConnectionFactory`
+**implementation classes**
+:   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.<br/>
+    Examples:<br/>
+    `class FileBasedRepository implements Repository`<br/>
+    `class VersionServlet implements HttpServlet`
+**exceptions**
+:   Like class names; always ending in "Exception".<br/>
+    Example:<br/>
+    `InputException`
+**methods**
+:   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/>
+    `run();`<br/>
+    `runFast();`<br/>
+    `setBackground();`<br/>
+    `isOptional();`
+**variables (except for (constant) static final variables and member 
variables)**
+:   All variables are in mixed case with a lowercase first letter. Words are 
separated by capital letters.<br/>
+    Examples:<br/>
+    `int index;`<br/>
+    `float myWidth;`
+**member variables**
+:   The same capitalisation as for normal variables prefixed with 'm_'.<br/>
+    Examples:<br/>
+    `int m_index;`<br/>
+    `float m_myWidth;`
+**constant (static final) variables, enum names**
+:   Names should be all uppercase with words separated by underscores 
('_').<br/>
+    Example:<br/>
+    `public static final int MAX_LIMIT = 99;`
+**packages**
+:   Lowercase only; avoid lengthy package names; always start with 
*org.apache.ace*.<br/>
+    Example:<br/>
+    `package org.apache.ace.demo.bundle;`
 
 Downloads
 ---------


Reply via email to