This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Network Server Code...please clarify

 
Ken Kirin
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All
I am a new rancher and I have seen a lot of helpful suggestions here. I am currently collecting ambiguous informations for my SCJD assignment before coding.
With a lot of "must" words, They raises me a lot of questions. But one of matters is about the Data class that must implement DBAccess Interface of the server(They are all explained in Server topic in the assignment). As I read the assignment,in non-networked mode,it said "this mode must use the database and GUI from the networked form, but must not use the network server code at all". Then should I not use both DBAccess Interface and Data class for the stand alone mode implementation because they would be considered the network server code? Or I might misinterpret the words " network server code". Any suggestion would be appreciative. Thank you.
 
peter wooster
Ranch Hand
Posts: 1033
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ken Kirin:
Hi All
I am a new rancher and I have seen a lot of helpful suggestions here. I am currently collecting ambiguous informations for my SCJD assignment before coding.
With a lot of "must" words, They raises me a lot of questions. But one of matters is about the Data class that must implement DBAccess Interface of the server(They are all explained in Server topic in the assignment). As I read the assignment,in non-networked mode,it said "this mode must use the database and GUI from the networked form, but must not use the network server code at all". Then should I not use both DBAccess Interface and Data class for the stand alone mode implementation because they would be considered the network server code? Or I might misinterpret the words " network server code". Any suggestion would be appreciative. Thank you.


There are various approaches to this, what I did was to make Data implement the DBAccess interface as described in the instructions and then built a DataProxy class using the Proxy pattern that also implements DBAccess. The DataProxy class uses RMI to access the Data class over the network. The business logic then uses either a DataProxy if its networked or a Data object if its local. This choice is based on the startup parms. See my recent posts to this forum, especially in reply 9 of Local Adapter Issue for more details.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic