| Author |
B&S: Mandatory data acess class and interface
|
Michael Cox
Greenhorn
Joined: Sep 04, 2008
Posts: 10
|
|
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
Joined: Jul 22, 2008
Posts: 100
|
|
|
You can use the Facade design pattern to provide a 'better' or more appropriate interface to your Clients if you want to.
|
SCJP, SCJD
|
 |
Michael Cox
Greenhorn
Joined: Sep 04, 2008
Posts: 10
|
|
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
Joined: Jul 22, 2008
Posts: 100
|
|
|
I think that what you are doing is fine.
|
 |
 |
|
|
subject: B&S: Mandatory data acess class and interface
|
|
|