• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

B&S: Mandatory data acess class and interface

 
Michael Cox
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Bodgitt and scarper 2.1.1 says:

"Your data access class must be called "Data.java", must be in a package called "suncertify.db", and must implement the following interface"

Does mean that this interface must be the one I offer to remote clients?

Or can I wrap the DB class in another class and offer a better interface to my remote client?

Be grateful for your thoughts and experiences,

Regards,

Michael
 
Jethro Borsje
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use the Facade design pattern to provide a 'better' or more appropriate interface to your Clients if you want to.
 
Michael Cox
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm still having pre-submission wobbles about this one.

Just because there is a mandatory DB interface does that mean that your RMI Remote interface offered to clients has to look the same?

(perhaps only with the addition of throwing RemoteException)

Currently my database object does implement the mandatory DB interface, but I wrap that database class in another class which offers a very different remote interface.

Be grateful for further assurances that I'm not cruising to automatic failure through misinterpreting the instructions.

Michael
 
Jethro Borsje
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think that what you are doing is fine.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic