aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Submitting this weekend: Comments Please Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Submitting this weekend: Comments Please" Watch "Submitting this weekend: Comments Please" New topic
Author

Submitting this weekend: Comments Please

Dave Teare
Ranch Hand

Joined: Oct 09, 2002
Posts: 80
Hi all!
I am planning on submitting my assignment this weekend, and would enjoy any comments y'all might have.
I decided to modify the existing Data class since it did not require any changes that were specific to the FBN application. I wrote a generic search function criteriaFind() within this Data class, and left lock() and unlock() as NOP's since I use a seperate LockManager class. (hence there was no need to subclass)
A DBConnection interface provides client access to the Data class, and as per the requirements it contains all the public methods of the Data class. This DBConnection interface is implemented by two classes, LocalDBConnectionImpl and RemoteDBConnectionImpl; which act as Data Access Objects (DAO). Each DAO contains a reference to a Data class, a LockManager class, and the client that is using the connection. The DAO delegates each method call to the appropriate class. The DBConnection interface acts as a Facade since it hides the Local vs. Remote network complexity.
Clients retrieve DBConnections via a DBConnectionFactory, which either creates and returns a local DBConnection, or connects to the RMI registry to access the DBConnectionManager, which hands out Remote DBConnections to the caller. The DBConnectionManager returns a DBConnection to each caller, and assigns the DBConnection a unique Client object, such that the DAO can notify the LockManager which client is locking the record.
The LockManager uses a simple HashSet to store the locked records, along with the client who locked it. The client ID is retreived from the DBConnection object, which has a reference to the client who created it (initialized by the DBConnectionManager).
The client UI is all written in Swing, and accesses the DAO via a buisness deleagte class. This class handles the locking, unlocking, and other low level DB functions, and surfaces a clean interface to the UI classes. This Business Delegate also wrappers the returned DataInfo objects into FlightInfo Value Objects (VO). The FlightInfo VO provides nice methods like getFlightOrigin(), etc, thereby allowing the client to be agnostic of the underlying DB structure.
The client UI has some very simple online help to assist the user.
I have a README.txt file that contains:

And a DESIGN_CHOICES.txt file that contains:

I have gone through every class and documented it using javadoc style comments, and generated the javadoc html files.
I created a TestSuite class that launches hundreds of client Threads to test the concurrency of the database; everything seems fine, even when using multiple JVM's.
I think I am ready to submit this bad boy!
Any comments?
I look forward to joining the ranks of the SCJD community
--Dave.
HS Thomas
Ranch Hand

Joined: May 15, 2002
Posts: 3404
You seem to have been really thorough. Can't see anything wrong. Are you prepared for the essay exam ? Can you justify your design choices ?
You haven't specifically mentioned the Model-View-Controller pattern in your GUI design .
Good luck .
John Smith
Ranch Hand

Joined: Oct 08, 2001
Posts: 2937

java -classpath $ROOT\lib\client.jar;$ROOT\lib\server.jar suncertify.ui.FlyByNightClient

Thi seems a bit convoluted to me. If you already have client.jar and server.jar, why not start your client this way:
java -jar client.jar
Eugene.
 
 
subject: Submitting this weekend: Comments Please