|
CodeOrganizationCamino code organization and standardsThis page describes in detail how Camino code is (or should be - work in progress) organized. The user interfaceCamino users interact with the commands in the Applications (apps)Apps have a special structure to accomodate Matlab wrapping and provide a consistent user interface. All applications should extend the
Executables must also provide a Once you've written an app, you need to add it to the java [options] EntryPoint AppName [options]
Other modulesOther modules are arranged by theme. These classes should not have main methods (a couple currently do, eg AnalyzeHeader / Nifti1Dataset), they should be objects with a well-defined and documented API. We don't have well-defined coding standards, but Effective Java by Bloch has some good guideines. CompilingCompilation is performed via a Makefile. Each class in DocumentationApplications should be documented with command-line usage, man pages, and online tutorials as appropriate. All classes should be documented with Javadoc for all methods. JavadocBy default, public, package and protected methods will appear in the javadoc. Private methods should be documented in the code with a Javadoc comment, but this is more for the benefit of people coding the class itself. You can build the Javadoc with UsageAll applications should provide a basic usage when passed the Man pagesMan pages are written in NROFF. Check how your man pages look when you type NAME program - One or two sentence description of what the program does SYNOPSIS program -mandatoryOption <arg> [-notMandatory <arg>] [...] Some programs have too many options to list; in which case just list the most common ones and indicate that there are more EXAMPLES Some common examples with a brief explanation DESCRIPTION Detailed description of what the program does OTHER SECTIONS AS NECESSARY OPTIONS Complete listing of options with explanation of their syntax and function AUTHORS Who wrote the program or a substantial portion thereof SEE ALSO Other programs of interest CAVEATS Formerly bugs, but more general. Includes known bugs, limitations, or common misconceptions The HTML man pages are auto-generated nightly - but new man pages need to be added to the Wiki. If you commit a new command, update the Wiki command list to point to the HTML version of that man page. TestingPlease see the test page for information about tests. Avoid embedding test code in the main methods of classes, or by writing test classes inside the packages themselves. For application tests, write a real-world use of the class and place it in ScriptTest. For unit tests, use the JUnit framework in the test directory. Java packages are virtual, you have the same access to package / protected methods in |