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

Another "public methods" consern

 
Misha Milshtein
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Client implementaton should include a class that implements the same public methods ad suncertify.db.data class...."
My question is: must the methods of the client class have the same exact signatures ad the Data methods, or it is enough for them to have the same functionality?
 
Rick Fortier
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It actually says that they should use the same class, Data.
The Data class knows how to read and write to the file. So whether the server is acting as a proxy to Data, or the client directly makes calls to Data, they both eventually get funneled through the Data class.
There is no reason to duplicate the same functionality when that code has already been written.
You need to provide an interface that will call the same Data methods, whether it is remotely or local.
 
Paul Anilprem
Enthuware Software Support
Ranch Hand
Posts: 3819
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, they must have the same signature. Of course, the client side methods will only delegate the call to the actual Data class either directly or through some remoting mechanism.
HTH,
Paul.
------------------
Get Certified, Guaranteed!
www.enthuware.com/jqplus

SCJP2 Resources, WebCompiler, Compare Mock Exam Results and More!
www.jdiscuss.com
Your guide to SCJD exam!
www.enthuware.com/jdevplus
 
Lance Finney
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Doesn't this require us to import all the db classes to the client?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic