File Structure of Your Project Submission


What directories do you need? Where should you place javadoc documentation? Where does the database binary file go? You must answer these questions before submitting your solution. You can approach the file structure of your project in two parts : how to package the classes and how to organize all the files into a single JAR file.

The application for your certification consists of your source code defining the classes that make up your solution. Regardless of how you build these classes, the source files should be separate from the class files. Remember that using too many directories or throwing everything into a single directory indicates weak organization of your file structure. Placement is debatable for only a few classes. For example, you will probably include a class that is the connection factory. Where should you place it? I placed mine in the database directory, but you could argue for the client or server directory. Otherwise, the directory for the majority of classes is obvious.

The following structure is an example you might consider adapting for your project submission:

Install_Directory

 

<certification_files>

README.TXT file and design choices document

 

+ mypackage

Object class files

   

+- client

All the client class files

   

+- server

All the server (RMI) class files

   

+- database

All the database- related classes

 

+ source

All the Java source files

   

+ mypackage

 
   

+- client

All the client source files

   

+- server

All the RMI source files

   

+- database

All the database source files

 

+ doc

javadoc directory

Notice that the mypackage directory will likely be the directory Sun uses in the source structure you downloaded. I recommend using the same one Sun does.

The straightforward approach to organizing your application files is to place the GUI in the client directory, the database binary and associated files in the database directory, and the RMI or socket-specific files in the server directory. Therefore, *.class files go under mypackage , *.java files under source , and *.html files under doc .

Some candidates overengineer their project and submit a huge number of files. At the other extreme, some candidates cram too much functionality in too few classes. Both approaches will receive poor scores. Remember that whatever directory you place a class in, you must use the proper corresponding package declaration, such as this example:

 package mypackage.client; 


JavaT 2 Developer Exam CramT 2 (Exam CX-310-252A and CX-310-027)
JavaT 2 Developer Exam CramT 2 (Exam CX-310-252A and CX-310-027)
ISBN: N/A
EAN: N/A
Year: 2003
Pages: 187

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net