Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

[URLyBird] Data interface

 
Oricio Ocle
Ranch Hand
Posts: 284
Debian Firefox Browser Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
i have several doubts regarding the DBAccess interface that the Data class must implement. This information is included in the server section of the document.

The problem arises related to the automatic check of the requirements.
I supose this class is going to be dinamically loaded from the server VM, or it's going to be exported to be tested in a client machine.

I decided using RMI, so in the first i should decide to wrap the Data object class in another (Remote) object and then give the client other remote interface more elaborated because this interface doesn't seem to be logic, ie i think locking methods should not be public to the client.
The second case is that worries me.
If this is the remote interface, what about RemoteExceptions? And why let a client lock a record without any other consideration?

I'm not sure at all is clear what i'm asking.
Thanks jRanchers
[ December 13, 2004: Message edited by: Ignacio del Valle ]
 
Lalit Deshmukh
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ignacio,

I think you are on right path(at least that's what I have taken.)

My Data object implements DBAccess interface. This Data object is planned to do low level work e.g. reading and writing to file.

I also have a DBClient interface for clients, whose methods throw RemoteException. The object that implements this DBClient interface wraps methods of DBAccess interface and uses the Data object.

Hope this helps.

+Lalit
 
Oricio Ocle
Ranch Hand
Posts: 284
Debian Firefox Browser Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Lalit, thanks for your reply.
I also think this is the best choice.
Regards
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 11944
212
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ignacio,

I decided using RMI, so in the first i should decide to wrap the Data object class in another (Remote) object and then give the client other remote interface more elaborated because this interface doesn't seem to be logic, ie i think locking methods should not be public to the client.


You might be interested in reading the discussions in "Should lock methods be callable by the client". It is extremely long, but there are some good arguments both for and against what you are suggesting.

My personal opinion is that the lock cookies only make sense if the lock method is made public to the client. (As you will see though, there is the counter argument that lock cookies do not make sense in any situation ).

Regards, Andrew
 
Oricio Ocle
Ranch Hand
Posts: 284
Debian Firefox Browser Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Andrew, that was just what i looking for!
Regards
 
Oricio Ocle
Ranch Hand
Posts: 284
Debian Firefox Browser Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A very interesting thread!
Thanks again, Andrew
 
Oricio Ocle
Ranch Hand
Posts: 284
Debian Firefox Browser Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, i've just finished reading the previous thread, but the question goes on.
Is the election determinant for passing the automatic check phase?
I think either of them (2 tiers / 3 tiers ) - see this thread - will be accepted if this phase is passed and you have the chance to explain your design to the examiners.
So this question is for current SCJDs:
What was your election?
Regards
[ December 13, 2004: Message edited by: Ignacio del Valle ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic