• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Server Classes in Data Client

 
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm probably overlooking something basic here, so please bear with me.
I'm planning to have an interface on the client side called DataClient. I'll have a LocalClient Class and a NetworkClient class that communication with the server differently.
Here's some of the interface:

This obviously won't compile because it doesn't know what DataInfo is. Should I import suncertify.db.DataInfo into this interface? If so, doesn't that unneccesarily couple the client to the server?
I'd rather not import them, but the requirements state "This implementation should include a class that implements the same public methods as the suncertify.db.Data class, although it will need different constructors to allow it to support the network configuration. "
Any thoughts?
 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I ran into the same problem. I decided that it was justifyable to have the coupling as the app requires local and remote access. Assuming that this functionality must exist within the same build you would HAVE to have those classes in the client code. We have to remember that this project is not a lesson in RMI bootstrapping with a completely clean client.
Hope this helps
 
We cannot change unless we survive, but we will not survive unless we change. Evolving tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic