File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes My design outlay - please critique. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "My design outlay - please critique." Watch "My design outlay - please critique." New topic
Author

My design outlay - please critique.

Anton Golovin
Ranch Hand

Joined: Jul 02, 2004
Posts: 476
Hello, and thank you in advance for your valuable time.

My design could be conceptually broken down into four packages:

suncertify.db
suncertify.db.io
suncertify.client
suncertify.server

I'd like to ask your opinion of the design of two of those packages:

The functionality in suncertify.db.io is such:

DBSchemaBuilder builds a valid DBSchema object. It throws DBSchemaBuilderException if it cannot build a valid schema.

DBSchema is then handed off to a DBParser. The DBParser knows how to read the db file based on the schema. It throws a DBParserException for error conditions, and uses exception chaining.

Classes in suncertify.db.io package take care of my db access functionality.

The functionality in suncertify.db is such:

DBCache is the database data class. It loads up the database into memory and knows how to manipulate the information. It is built using a DBCacheBuilder, which throws a DBCacheBuilderException.

Data gets a copy of DBCache and DBParser. It is responsible for ensuring thread safety and synchronization of data in the DBCache and the db file. Before it changes the data in DBCache, it requires a true return from an appropriate DBParser method, indicating the data were written to disk. It also gets a copy of DBLocker, which contains locked records. Data class throws required exceptions, which are chained.

DataAdapter implemets a DBClient interface, which contains more understandable methods for application logic - book instead of lock, change record, unlock, for example. It throws chained exceptions such as BookingException, DeleteRecordException, CreateRecordException, etc.

DataImpl class implements the DBRemote interface, which extends DBClient and remote interfaces; and it extends the UnicastRemoteObject. It is the remote class.

It throws the same exceptions as the DBAdapter class since it also implements the DBClient Interface.
[ August 13, 2004: Message edited by: Anton Golovin ]

Anton Golovin (anton.golovin@gmail.com) SCJP, SCJD, SCBCD, SCWCD, OCEJWSD, SCEA/OCMJEA [JEE certs from Sun/Oracle]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: My design outlay - please critique.
 
Similar Threads
remote client provides methods of db.Data?
RMI implementation
NX: Can you pass if you extend DB ?
FBN - Design choices
Question about GUI