aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Design and Requirements confusion Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Design and Requirements confusion" Watch "Design and Requirements confusion" New topic
Author

Design and Requirements confusion

Jaideep Chadha
Greenhorn

Joined: Jan 23, 2002
Posts: 12
I am confused on the requirement that says "The remote client that you write must provide all the public methods of the suncertify.db class".
I don't understand this part because to have a cleaner design, I would like to implement convenience methods like bookFlight, findFlights etc. in the client. These calls will be implemented on the server side also and the server side can make calls to the Data class.
Any comments or suggestions please.
Thanks
Sai Prasad
Ranch Hand

Joined: Feb 25, 2002
Posts: 560
You can still implement bookFlights() and searchFlights() at the client but you need to invoke the methods defined in the Data class from client via a proxy client object.
Think about an Interface with all the methods defined in the Data class. This interface can be implemented by the client proxy, server remote object and the database Data classes.
Jaideep Chadha
Greenhorn

Joined: Jan 23, 2002
Posts: 12
So in actual I should implement two clients - one that is used by the UI so to invoke methods like searchFlights etc. and then this client calls the methods in the proxy client that you suggested.
Am I understanding you correctly?
Thanks for the reply.
Sai Prasad
Ranch Hand

Joined: Feb 25, 2002
Posts: 560
Here is the flow:
GUI -> Controller -> Data Proxy -> _Stub
Controller can use a DataFactory to find/create the Data instance, assign that instance to a proxy and return to the controller. I didn't have a bookFlights() method in my submission. If you are going have bookFlights() method, I would rename the proxy as an Adapter and implement the method in it.
Jaideep Chadha
Greenhorn

Joined: Jan 23, 2002
Posts: 12
I think I understand this. Thanks for your help
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Design and Requirements confusion
 
Similar Threads
Sockets -- SCJD -- Is there anybody who used ?
Multi-threading programming: we do not need lock() unlock() at all
Locking Requirements
bookSeat() on clientside or serverside?
confusion on FBN