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
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.
Joined: Jan 23, 2002
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.
Joined: Feb 25, 2002
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.