Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Altering DB interface

 
David Abramowicz
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!

I know that we're not allowed to alter the DB interface that the Data access class MUST implement.

However, I was thinking that the if the DB interface extends an interface with exactly the same methods, only WITH throws RemoteException; it would solve a lot of problems.

So:

interface BaseDB
{
read(int recNo) throws RemoteException
etc throws RemoteException
etc throws RemoteException
}

interface DB extends BaseDB
{
read(int recNo)
etc
etc
}


The question is, would I be violating any MUSTs (or taking it one step further, be auto-failed) if I tag the DB interface as extending another interface?

Thanks /Dave
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You will still be auto fail because you have changed the given interface DB, from not extending anything to extending another interface.

I wonder, why you need to throw RemoteException for the data access. It is because it is only focus on data access no matter you are local or remote client. Also, as this is a low level API that access with the "DB", should the client really being able to invoke it directly?

For my implementation, I keep everything unchanged for the DB access interface, while I will provide (create) another interface for the user (GUI) to invoke with the network server, and only the network server (or data server) will invoke the DB interface.

Nick
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic