This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes question about data client Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "question about data client" Watch "question about data client" New topic

question about data client

Holmes Wong
Ranch Hand

Joined: Feb 18, 2002
Posts: 163
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.
Mark Spritzler

Joined: Feb 05, 2001
Posts: 17249

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.

Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Holmes Wong
Ranch Hand

Joined: Feb 18, 2002
Posts: 163
Thanks, Mark. I gonna use Factory Method to separate local/remote data accesses. That helps a lot.
I agree. Here's the link:
subject: question about data client
Similar Threads
Data Conversion clarification.
get all records in GUI in B&S
Request For Comments
Passing DatabaseException to Client Side?
result sets