This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

question about data client

 
Holmes Wong
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
As the requirements go, we have to implement the same public methods in client as data class in db package. Since data class has already had all theses implementations, will it be redundant to reimplement them again in the client side? Or, does that mean we should just import them from db to the client class? Thanks.
I
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For Local mode you will be dealing with those classes directly. So yes you are importing. But you want to be careful, because how much should you client/GUI know about database side. Not much, so by using Facade and Factories you can hide the low level implementation while still having the Data stuff on the client side for local mode.
Mark
 
Holmes Wong
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, Mark. I gonna use Factory Method to separate local/remote data accesses. That helps a lot.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic