• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

local implementation of DataInterface

 
Daniela Ch
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Peter :
And of course the local implementation of DataInterface is Data itself.

Which solution is better:
1- Make Data implement DataInterface
2- Keep Data the way it is. Make a DataAccessLocal class that implement DataInterface and hold a reference to a Data?
Maybe this sound like a stupid question :
what is better, to add 2 words (implements DataInterface) or a whole class? dooohh...
but are there advantages/disadvantages that I dont see?
daniela
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, my opinion you know already. If DataInterface is an interface with all the public methods of Data, then surely Data implements DataInterface. It's the only thing that makes sense.
If you decouple Data from DataInterface, there is no longer any need for DataInterface to have all the public Data methods; then it will have to fend for itself and you would really have to justify and construct this interface from the ground up. This starts with basic questions like: what are the responsibilities of this interface? What does it need to do? Will it be generic or FBN-specific?
Of course if you'd go down that route, you will run into problems with the requirement that you must have a client-side object that implements all the public methods in Data. So all in all it's a bit of a non-starter.
- Peter
 
Daniela Ch
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanx peter...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic