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

question about the non-network mode

 
Yanxin Zhao
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a broblem about the non-network mode. I am not sure how to do it.
I wanted to defined a class named NonnetworkAdapter to use the code Data.java(I use this code to read data from db file with network mode) directly.
But, that 's just the reason I am not sure how to do it. because the document sun given me said that "must not ues the network server code at all".
So I want to ask that do I break the "must", if I define a class named NonnetworkAdapter to use the code Data.java directly ?
 
Jon Entwistle
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Yanxin,

The code for Data must be used either directly or indirectly for all modes. I used a factory instance to hand out either a remote or local version of Data to the GUI - this version can be created in various ways, e.g. through a proxy/adapter class or by handing out an interface implemented by both the remote and local classes at the factory.

Hope this helps,

Jon
 
Robert Konigsberg
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think that "not using network code at all" means that if you were (figuratively) to remove all code that referred to java.net.*, the application would work in non-networked mode.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic