• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Design opinons welcome

 
Nigel Browne
Ranch Hand
Posts: 703
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
Mark
 
Nigel Browne
Ranch Hand
Posts: 703
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic