• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Design and Requirements confusion

 
Jaideep Chadha
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 560
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 560
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think I understand this. Thanks for your help
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic