$Revision: 1.1 $
$Date: 2002/02/22 19:49:08 $
The clra-java project should be buildable on any machine. The steps for doing a build on a new machine are discussed elsewhere. In order to have machine-independent and reproducible builds, the project has the directory structure described here.
At the top-level of the project tree are two build files: build.bat (for builds on a Windows machine) and build.sh (for builds on a Unix machine). These should be the only files at the top level.There a set of directories that are maintained under source code control. These directories contain ancillary script files; documentation files (such as this note); configuration data; source code; and HTML, JSP and image files.
There are two directories that are constructed as the part of a build. These directories hold temporary, working copies of output files and (separately) the final products of various build targets.
This directory contains configuration data, in the form of xml and sql scripts. Sql scripts are divided between two subdirectories, sql-mysql and sql-oracle, for MySQL and Oracle scripts respectively. As discussed in the document on database setup, most MySQL scripts are not source-controlled, but rather generated from Oracle scripts by the oracle-to-mysql.sh shell script contained in the bin directory.
The com/clra branch is main source code branch. The test/clra branch is a set of recursive JUnit tests that cover the com/clra code branches.
Currently, the com/clra contains four subdirectories:
The directories above are listed in order of dependency. The util directory has no dependencies on other CLRA classes. The member directory has dependencies on classes in the util directory. The rowing directory has dependencies on classes in the util and member directories. The web directory depends on all the other directories.
Note: new dependencies should not be introduced between the directories listed above.
It is important that dependencies be minimized if code is to be testable. With the above structure, testing can occcur in layers. First, utility classes can be tested without regard to classes in any other package. Second, member classes can be tested. Because member classes depend only on utility classes, and because utility classes are tested first, testing can focus only on functionality defined in the member package. Similarly, layering permits testing of the rowing and web packages can focus strictly on the functionality of the rowing and web packages. With layering, the complexity of testing grows just linearly with the number of classes. Without layering, when couplings are allowed to multiply without constraint among packages, testing grows exponentially complex with the number of classes.
The admin directory contains screens restricted to club administrators. The help directory contains help screens. The restricted directory contains screens restricted to club members
Back to topThe classes directory contains the complete Java class hierarchy generated by a build: servlet-related classes and properties, test harnesses and properties, and any other code, such as EJB's and client-side code. In general, it is not a good practice to use this directory tree in a classpath, because of the way that servlet, test, ejb and client classes are jumbled together. Testing against such a jumble will mask configuration issues.
The doc diretory contains generated Javadoc HTML files, plus any other files copied over from the doc directory.
The lib diretory contains deployable jar files for servlets, EJB's, client-side test harnesses, and documentation.