Hi, everyone! A friend of mine told me the great forum, so I come here! I got some problems and need some help. I try to use the following way to do my B&S assignment.
The above diagram belongs to local section. In order to return to clients the same connection object(either in local or in remote mode), the methods in DataInterface which are similar to those in DBMain throw RemoteException and RecordNotFoundException so that in the server side the RemoteData class could implement the DataInterface.
If I go in this way, would I break one of the rules in my instruction since I make the DataInterface throws RemoteException? The instruction states that Non-Networked mode must use the database and GUI from the networked form, but must not use the network server code at all. I am not sure this solution is one of the simpler approaches cos it is a bit more complex.
Welcome any comments! Regards, Alisa Cape [ August 10, 2005: Message edited by: Ailsa Cape ]
I think you are good here. I think the thing you would want to avoid is having a UI class that was using or extending a server side class which implemented UnicastRemoteObject (hope I got that right or I will be embarrassed!), because that object is going to be generating stubs, which do use networking code.
Thank you,Lara and Andrew! You convinced me that my design is acceptable and confirmed my belief that I can go along this way.
Regards, Ailsa Cape
posted 13 years ago
It seems happy along the way I'm going. I was suddenly stumped by a new question.
The update method in the interface of DataInterface can throw RecordNotFound and RemoteException. In the client side,
Even if the database is an instance of the class LocalData in runtime, the compiler forces me to report RemoteException when using "database.update();". It is easy to comply with the compiler's reminder,but do I break the requirement in my instructions,"Architectuarlly, the Non-Networked Mode must use the database and GUI from the networked form, but must not use the network server code at all"?
Thanks in advance! Regards, Ailsa Cape [ August 20, 2005: Message edited by: Ailsa Cape ]
I think you will be fine - your GUI may have exception handlers for network problems however they won't be used. Similarly you wont be starting your network server or trying to connect over the network.