clarify this pls
posted 23 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
[B]" Writing Data Client. This implementation should include a class that implements the same public methods as the Data class "[\B]
what does this mean? pls help
what does this mean? pls help
posted 23 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Hi Kruger,
I have the same statement in my requirements, and I am also wondering about what I am supposed to do.
My design has a GUI, a remote DataAccess.class, and a DataAccess.class with a reference to Data. DataAccess has the same public interface as Data, plus business methods such as loadAll(), book().
I feel that it is enough if DataAccess has the same public interface as Data. Tucking something like DataClient between my GUI and DataAccess seems to be an unnecessary level of indirection.
However, maybe I create an interface called DataClient. This interface is implemented by DataAccess.
Any comments on this question are welcome!
I have the same statement in my requirements, and I am also wondering about what I am supposed to do.
My design has a GUI, a remote DataAccess.class, and a DataAccess.class with a reference to Data. DataAccess has the same public interface as Data, plus business methods such as loadAll(), book().
I feel that it is enough if DataAccess has the same public interface as Data. Tucking something like DataClient between my GUI and DataAccess seems to be an unnecessary level of indirection.
However, maybe I create an interface called DataClient. This interface is implemented by DataAccess.
Any comments on this question are welcome!
Mag
posted 23 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Here is what I did...
Local:
GUI -> ConnectionFactory -> LocalData (that extends Data)
Remote:
GUI -> ConnectionFactory -> RemoteDataFactory (on server) -> RemoteData (extends UnicastRemoteObject) and has ref to the one Data created by the RemoteServer
My ConnectionFactory returns a DataAccess interface (either RemoteData or LocalData as shown) above. This is determined based on the command line options that the client is given. My GUI also has a Facade (pattern) class that does things like booking and searching so that other developers can just call those methods rather than deal with the logic that is inside the methods.
Hope that helps
[ August 29, 2002: Message edited by: Nate Johnson ]
Local:
GUI -> ConnectionFactory -> LocalData (that extends Data)
Remote:
GUI -> ConnectionFactory -> RemoteDataFactory (on server) -> RemoteData (extends UnicastRemoteObject) and has ref to the one Data created by the RemoteServer
My ConnectionFactory returns a DataAccess interface (either RemoteData or LocalData as shown) above. This is determined based on the command line options that the client is given. My GUI also has a Facade (pattern) class that does things like booking and searching so that other developers can just call those methods rather than deal with the logic that is inside the methods.
Hope that helps
[ August 29, 2002: Message edited by: Nate Johnson ]
scwcd, scjd, scjp<br /><a href="http://natejohnson.us" target="_blank" rel="nofollow">http://natejohnson.us</a><br /><a href="http://rice.kuali.org" target="_blank" rel="nofollow">http://rice.kuali.org</a>
posted 23 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
What the statement means is that you need to create an interface that has all the public methods of the Data class, you will then create two classes that implement this interface. One for Remote Access and one for Local Access.
You can then make a Facade class that wraps around a DataAccess interface and only provides methods for the GUI that make sense, like bookFlight() or getAllAirlines() or searchFlight().
But including the Facade is up to you. I highly recommend this solution though.
Mark
You can then make a Facade class that wraps around a DataAccess interface and only provides methods for the GUI that make sense, like bookFlight() or getAllAirlines() or searchFlight().
But including the Facade is up to you. I highly recommend this solution though.
Mark
| I am Arthur, King of the Britons. And this is a tiny ad: Paul Wheaton's 16th Kickstarter: Gardening playing cards for gardeners and homesteaders https://coderanch.com/t/889615/Paul-Wheaton-Kickstarter-Gardening-playing |








