Information for Developers
This page presents some guidelines and other information for XRAYS developers. The intent is to provide only those guidelines that help insure the commonality that is necessary for efficient, coordinated development without unduly restricting the developer.
Help
Help is a necessary ingredient of software, although it is one that is often neglected. It is expected that all of the applications for XRAYS will have extensive help. While it may not be the favorite way for developers to pass time, the fact is that the time required to develop help is very small compared to the time to develop code. One needs to develop the discipline to do it and do it well. The time you put into documentation as well as good error and warning messages is leveraged many times by the time it saves users. Conversely, the time you don't spend on it is correspondingly multiplied in user frustration.
Java
Sun has established Code Conventions for the Java Programming Language and also gives reasons for having guidelines in the first place. These seem to be a good set of conventions that are, in fact, already followed by many Java programmers. XRAYS has adopted these guidelines, and XRAYS code should follow them.
As a special note, all Java methods and classes should have Javadoc comments.
Eclipse
Eclipse will be an important part of the software foundation for XRAYS, and developers should use it themselves. This is in part because they need familiarity with the environment that we expect users to use. We expect that a common user interface, one that other people understand and can help you with, will be beneficial to users in many ways. For the same reasons such a common environment will be beneficial to XRAYS developers.
Eclipse has Java Code Style settings that can be imported and exported. These are set in Window | Preferences | Java | Code Style. There are two recommended settings files that may be imported.
- Code Templates: Import the file XRAYS.CodeTemplates.xml. The user name under Comments | Types and under Code | New java Files should be changed to your own name.
- Formatter: Import the file XRAYS.Formatter.xml. The profile will be XRAYS.
These settings will evolve, and you are free to express your suggestions for modifying them. Using them should help insure that we have commonly-formatted code that other XRAYS developers can read and modify easily.
The following cheat sheets may help you with Eclipse:
Java Versions
Developed Java applications should be expected to run with Java 6. Java 6 may, in fact, soon be required for users. ISAW currently requires Java 6. The currently suggested JDK for Eclipse is JDK 1.5.0_09 (Java 5). This is set under Window | Preferences | Java | Installed JREs. It is expected that we will soon change to JDK 1.6.0 (Java 6) and this would also be an acceptable choice. The primary improvement in Java 6 is increased performance.
It is desirable to keep the code compliance as low as possible to minimize problems. However, the benefits of features, such as generics, added in Java 5 warrant setting the code compliance to 5.0. In Eclipse this is set in Window | Preferences | Java | Compiler.
Java Links
Books
The following books are recommended:
Core Java(TM) 2, Volume I--Fundamentals (7th Edition) (Core Series) (Paperback)
by Cay Horstmann (Author), Gary Cornell (Author)
Core Java(TM) 2, Volume II--Advanced Features (7th Edition) (Core Series) (Paperback)
by Cay Horstmann (Author), Gary Cornell (Author)
Java(TM) Developer's Guide to Eclipse, The (2nd Edition) (Paperback)
by Jim D'Anjou (Author), Scott Fairbrother (Author), Dan Kehn (Author), John Kellerman (Author), Pat McCarthy (Author)
Eclipse: Building Commercial-Quality Plug-ins (2nd Edition) (The Eclipse Series) (Paperback)
by Eric Clayberg (Author), Dan Rubel (Author)
The Definitive Guide to SWT and JFACE (Paperback)
by Robert Harris (Author), Rob Warner (Author)

