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!
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 ]
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