• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Public Interfaces for the Data Client and Data Class: Clarification

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

In the Fly By Night specification (when describing writing the Data Client class) it requires the following:
"This implementation should include a class that implements the same public methods as the suncertify.db.Data class"
It doesn't seem right that the Data Client should have methods such as lock()/unlock()/close() or does it?? Can someone explain their thoughts on this one please?? It would be much appreciated as this is one of those vague areas.
Thanks for your time,

Stuart Bell
 
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Stuart Bell:
Hi All,

In the Fly By Night specification (when describing writing the Data Client class) it requires the following:
"This implementation should include a class that implements the same public methods as the suncertify.db.Data class"
It doesn't seem right that the Data Client should have methods such as lock()/unlock()/close() or does it?? Can someone explain their thoughts on this one please?? It would be much appreciated as this is one of those vague areas.
Thanks for your time,

Stuart Bell


If it is thier requirement, you must treat it as such. It did not however say that you must implement the lock/unlock in the Data class.
I think most people have created an interface which contains all of the public classes. As in any interface, you can choose which to implement and which to have stubs only.
My Data class does not implement lock and unlock, I have created a LockManager class which implements them. Since lock and unlock are not necessary in local mode I dont think that they should be in Data.
For the server, I have a class called FBNServer which serves as a pass through to my Data and LockManager classes.
For the client, I have a FlightServices class which goes between the GUI and Data classes. It follows the factory pattern and will instantiate different classes depending on whether I am in local or remote mode. It has methods such as BookFlight(), etc..
The GUI class does not know about lock() and unlock(), FlightServces does.
 
I'm not dead! I feel happy! I'd like to go for a walk! I'll even read a tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic