• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

requirement clarification

 
Cathy Young
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The last paragraph in "Overall Architecture" of the requirement specification says:
The remote client code that you write must provide all the public methods of the suncertify.db.Data class.

Can someone kindly explain what exactly does this mean?
Thanks!
 
Dayanand Kangala
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I understood it as follows:
The RemoteData object should implement the suncertify.db.Data Interface - similar to the LocalData object which implements the suncertify.db.Data interface. (I have the same interface in client.jar and server.jar)
(I have modified the Data interface to "extends Remote" and also have appended "throws RemoteException" in all the methods. I did this to enable me to cast the RemoteData object to the Data interface - in the client, in network mode. Hope this is ok!)
Dayanand.
 
Cathy Young
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Dayanand Kangala:
The RemoteData object should implement the suncertify.db.Data Interface - similar to the LocalData object which implements the suncertify.db.Data interface. (I have the same interface in client.jar and server.jar)

Do we have to have both RemoteData and LocalData? If so, these two classes will be very similar.
 
Dayanand Kangala
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Cathy Young:

Do we have to have both RemoteData and LocalData? If so, these two classes will be very similar.

In my implementation, both classes implement DBMain interface (this the interface which was present in the intructions.html) and both have the same method definitions.
The only difference is that my RemoteData extends UnicastRemoteObject to enable the client to receive the RemoteData's stub.
Dayanand.
 
Cathy Young
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Dayanand Kangala:

In my implementation, both classes implement DBMain interface (this the interface which was present in the intructions.html) and both have the same method definitions.
The only difference is that my RemoteData extends UnicastRemoteObject to enable the client to receive the RemoteData's stub.
Dayanand.

Thanks, Dayanand. This is exactly what I thought about having two Data classes. But my concern is: do we really want to duplicate (almost) the implementation? Will we be penalized for this or this is exactly expected for this assignment?
Thanks!
Cathy
 
Cathy Young
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can someone kindly, explicitly confirm that we need to Data classes, say LocalData and RemoteData, and both implements the Data interface. They are pretty much the same except that the methods in RemoteData throws RemoteException and have lock () and unlock () implemented.
Thanks!
Cathy
 
Jim Bedenbaugh
Ranch Hand
Posts: 171
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Cathy Young:
Can someone kindly, explicitly confirm that we need to Data classes, say LocalData and RemoteData, and both implements the Data interface. They are pretty much the same except that the methods in RemoteData throws RemoteException and have lock () and unlock () implemented.

I did not have two Data classes. I had one. It implemented an interface that had all the Data methods. This same interface was used in a DAO that returned Value Objects.
 
Cathy Young
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jim Bedenbaugh:

This same interface was used in a DAO that returned Value Objects.

What is "DAO"?
 
Peter Hundal Nielsen
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
'DAO' is a Data Access Object. They are used to encapsulate all access to data sources. They are described in Alur, Crupi and Malks: Core J2EE Patterns.
 
Max Habibi
town drunk
( and author)
Sheriff
Posts: 4118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Cathy Young:
Can someone kindly, explicitly confirm that we need to Data classes, say LocalData and RemoteData, and both implements the Data interface. They are pretty much the same except that the methods in RemoteData throws RemoteException and have lock () and unlock () implemented.
Thanks!
Cathy


Hi Cathy,
This would be my suggestion, yes.
All best,
M, author
The Sun Certified Java Developer Exam with J2SE 1.4
 
Cathy Young
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, guys!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic