aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Confused with specs Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Confused with specs" Watch "Confused with specs" New topic
Author

Confused with specs

Andrew Hanger
Greenhorn

Joined: Jul 15, 2002
Posts: 8
Hi, all.
I'm getting a little bit confused with the assignment specs. It explicitely says that "...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...". I don't see any reasons creating such local class because most of the methods exposed in it won't ever be needed on the client. My original idea was to create a proxy (facade) remote interface with more general methods like "bookFlight()" in it that represent application logic. Of cource, the implementation will rely on the Data class to fullfill the processing requirement, but that will happen on the server side, thus no client analogue of Data class for remote communication is required.
Why would I need, for example, "lock/unlock" methods exposed via interface? They don't seem to be invoked by client separately, only through larger "bookFlight" transaction. Am I missing something?
Please, share your thoughts on the matter.
Steve Granton
Ranch Hand

Joined: Jan 13, 2002
Posts: 200
Hi,
Since the specification states that you should implement this class then you would probably be wise to do so. However, in my view there is nothing stopping you implementing your facade to call the methods of this class. That way you are meeting the specification and your own design choices. In fact this is probably the way I am going to implement the client side.
I hope this helps,
Cheers,
Steve
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17257
    
    6

Andrew,
In your situation you will then be locking in local and remote mode. In local mode there is no server and no concurrent users, just one user accessing one db.db file, do you need locking in that local mode?
Also you will find that if you want to use the LockManager that many people post about, you will probably need that interface/implementation seperation, to make it really easy to do.
Hope that gives you food for thought.
Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Confused with specs