Added by Jive, last edited by jgarnett on Nov 20, 2006  (view change)

Labels:

pending pending Delete
Enter labels to add to this page:
Wait Image 
Looking for a label? Just start typing.
PMD http://pmd.sourceforge.net/

Naming conventions is another one of those things that are fun to learn working with a new codebase. We use PMD to help you avoid this kind of fun.

Geotools makes use of the following naming conventions.

Artifact Sample Convention
Directory ext/validation Directory names shall be all lower case with no spaces.
Package org.geotools.filter Packages shall be all lower case with no spaces and should be located in org.geotools package
Interfaces Query Geotools interfaces are usually located in the main module. Interfaces should be called XXX.java
Implementation PostgisDataStore Append the name of the interface being implemented
Default DefaultQuery Default implementations should be called DefaultXXX.java
Abstract AbstractDataStore Abstract implementations should be called AbstractXXX.java
javadoc doc-files/ Javadoc makes use of doc-files directories in the package heirarchy to allow the inclusion of rich content in generated api documentation.
junit test-data/ JUnit test cases make use of test-data directories in the package heirarchy
test SampleTest JUnit test, picked up by maven build process
online test ServerOnlineTest JUnit test making use of line resource such as a web service

Some versions of windows do not distinguish between upper and lower case, and in unix, writing spaces in filenames is painful.

Notes:

  • both test-data and doc-files do not follow the package naming convention allowing them to be easily distingished from normal code
  • both Test and OnineTest are picked out by the maven build process for special treatment