• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

My DB design

 
Vishwa Kumba
Ranch Hand
Posts: 1066
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My DB design - draft ver 1.0
Interface Common {
Collection search(String name, String loc) throws MyException, IOException
void book(int rec) throws MyException, IOException
}
(DB: Sun's interface to access the database file)
Class Data implements DB {
- the methods also throw an additional RuntimeException
containing the wrapped IOException if it occurs.
}
Class MyDataAdapter implements Common {
- contains Data class as a member object;
- delegates the calls to this object.
}
Class MyServerImpl extends UnicastRemoteObject Common, Remote {
- contains the MyDataAdapter as a member object;
- delegates the calls to this object.
}
Local client uses MyDataAdapter and Remote client uses MyServerImpl through Common interface to call methods.
What tickles me with this approach, is that it seems to be very simple and has a striking resemblance to Max's DVD project with a 3-tier twist. Any comments on the above approach will be appreciated.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic