Originally posted by Mark Spritzler:
Yes, and even simpler and cleaner, if you have a factory to return either LocalDataAccess, or RemoteDataAccess class in the beginning of your gui code, and pass either one to your facade, your facade doesn't have to have an if statement to check the mode, it just passes it to the reference of a DataAccess implementing class, which is what LocalDataAccess and RemoteDataAccess classes are.
So in my code the only place I have a "If" statement is in the beginning so that the factory class knows which implementation to return.
Mark
Does this mean that:
1. Facade has only the bookFlight() method.
2. RemoteDataAccess class has the lock/unlock methods implemented?
3.And irrespective of mode the lock/unlock methods will be called, but they will be handled differently based on the local and remoteDataAcess classes, right?
thanks,
sri