wood burning stoves
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Design opinons welcome 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 "Design opinons welcome" Watch "Design opinons welcome" New topic

Design opinons welcome

Nigel Browne
Ranch Hand

Joined: May 15, 2001
Posts: 673
My design consists of:
3 packages DB, Server and Client
The DB package contains the following:
All classes provided by Sun. Data class will be modified. Lock manager class will be innerclass.
DataInterface - All public methods extends Remote throws Exception
The Server package contains the following:
RemoteDataImpl - implements DataInterface throws RemoteExceptions acts as wrapper sending all method calls to Data class
LocalDataImpl - implements DataInterface acts as wrapper sending all method calls to Data class
The Client package contains the following:
StartClient - uses factory pattern in constructor creating an instance of LocalDataImpl or RemoteDataClient, kicks off Gui.
RemoteDataClient - Rmi client of RemoteDataImpl
ClientController - acts as event listener, has methods such as bookSeat()
ClientModel - creates a model for the JTable
Client - main Gui class
I am not quite such about how complex to make the GUI classes I could quite easily create 5 classes broken down by JPanel but at the moment think that might be overkill.
I welcome all comments
Mark Spritzler

Joined: Feb 05, 2001
Posts: 17276

Nigel, I like all your classes. Here are some questions for you to think about.
If you are splitting the DataAccess Implementations from the db package, then why are both LocalDataImpl and RemoteDataImpl in the server package. With this logic, it assumes you think that local needs to have a server. Does it?

What does this mean?
"RemoteDataClient - Rmi client of RemoteDataImpl"
Pther than those two points. I like that you have your DataAccess Interface throwing Excepetion, then the implemetations throwing more specific Exceptions.
Good Job.

Perfect World Programming, LLC - iOS Apps
How to Ask Questions the Smart Way FAQ
Nigel Browne
Ranch Hand

Joined: May 15, 2001
Posts: 673
Mark, thanks for your comments. I have moved the LocalDataImpl to the client package, as the class just implements the Data class for the client.
The RemoteDataClient class connects to the RMI registry. It instantiates a DataInterface object which passes the client method calls to the RMI server.
I agree. Here's the link: http://aspose.com/file-tools
subject: Design opinons welcome
It's not a secret anymore!