Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

About Non-Networked Mode

 
Ailsa Cape
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Lara McCarver
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 12014
220
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ailsa,

Welcome to JavaRanch and this forum.

Like Lara, I think you should be fine with this.

Regards, Andrew
 
Ailsa Cape
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ailsa Cape
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,Andrew

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 ]
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 12014
220
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ailsa,

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.

Regards, Andrew
 
Ailsa Cape
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for so quick response! You answers are always helpful.

Regards, Ailsa Cape
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic