• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

data class adn adat client..

 
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i have gone through the data class..
i think that this class should be on the server side. and whats this data client what has this to do.
secondly..
this data class will be there in local mode also, and as we have to code the three methods criteriafond, lock and unlock.
the lock and unlock method is not required in local mode so whats has to be done, if i have to follow the spec properly then i will have to add dummy methods of lock and unlock for local mode also
and lastly do we have to have the data client in case of local mode also.
byee
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hmm, how to answer.
Ok Your data class will have the lock, unlock, and criteriaFind methods all defined in it. You will have a copy of this class in both your server and locally. locally so that they can run in local mode.
It is true in local mode there will never be a call to lock or unlock, so to speak.
If you have an interface that has all the public methods of the Data class, and then implement them into two class the DataAccessLocal, and the DataAccessRemote. In the remote class you implement code into your lock to call Data.lock, and so forth with unlock. In the DataAccessLocal implementation your lock and unlock code should not call Data.lock or Data.unlock at all, as a matter of fact you will probably leave those methods empty. as in

For Local

That the short of it
Hope that helps
Mark
 
Siddharth Mehrotra
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
okay mark i got that...
u mean to say that.. the data class will be there on both local and remote scenario but the call to lock and unlock will be be bypassed somehow in local mode..
well that taken .. but there is one more stuff remaining and thats Data Cleint, as per the specs the networking code must be in data client class. so that means that in network environment the call for methods in data class (which is on server side) will be made through data client class.
do i have to follow the same scene in case of local mode and here i should modify the methods so that there is no network call there. Or can i skip this class in case of local mode..
i know i ask too many questions , Sorry for that.
byee
 
Mark Spritzler
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok, I need to go with tise one step at a time
First

u mean to say that.. the data class will be there on both local and remote scenario but the call to lock and unlock will be be bypassed somehow in local mode..


Yes. While the Data class will "reside" in both places, the client will never directly call the Data class in local or remote.

Next

but there is one more stuff remaining and thats Data Cleint, as per the specs the networking code must be in data client class. so that means that in network environment the call for methods in data class (which is on server side) will be made through data client class.


Not quite sure what this says. What is Data Client class? Is that one of the two classes that would implement the Data classes methods from some DataAccess interface? In this case the two classes, one for local one for remote would separate the need or not need of calling lock or unlock.
and finally

do i have to follow the same scene in case of local mode and here i should modify the methods so that there is no network call there. Or can i skip this class in case of local mode..


Yes. sort of like that, if I am understanding.
In my DataAccessLocal class that implements the DataAccess interface, I have a lock and an unlock method, however there is nothing in the methods, they are just there because by implementing the interface I have agreed to define all those methods.
Hope that is on the same lines. and I hope that helps.
Mark
 
Siddharth Mehrotra
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Overall Architecture
Architecturally, the application is a traditional client-server system. There are three key parts: the server-side database with network server functionality, the client-side graphical user interface, and a client-side database client part that handles the networking on behalf of the user interface
-----------------------------------------
Writing Data Client
To connect with your server, you should create a client program. This implementation should include a class that implements the same public methods as the suncertify.db.Data class, although it will need different constructors to allow it to support the network configuration.
-------------------------------------------

THESE ARE THE TWO PARTS IN THE SUN SPECS THAT TALK ABOUT DATA CLIENT..
CAN YOU PUT LIGHT ON THIS...
reply
    Bookmark Topic Watch Topic
  • New Topic