in my assignment it says "your data access class must be called Data.java, must be in a package called suncertify.db and must implement the following interface" <standard DB interface>.
I've taken this to mean that this class must be used to do access to the database from the remote client or the local/server side. So, my Data.java is an ellaborate facade (with factories and adapters etc) that either establishes a remote connection to a serverside database, or creates an object to read the database locally. So as far as data access goes, my Data.java is the highest level data access point and everything happens in it.
Has anyone else interpreted it like this, or do most people use Data.java for the direct file access to the DB then build on top of that?
Honestly, you'd think Sun were out to confuse people the way they write their assignments!
Thanks for your help, Rich [ September 06, 2006: Message edited by: Richard Levy ]
I've taken the same approach as Livui. Data.java is my file access class, which I then call via a Persistence Manager object to allow a decoupling point between data access logic and physical data access.
McFinnigan? Never heard of him. Nobody here but us chickens...<br /> <br />SCJP for Java 1.4<br />SCJD for Java 5.0
I chose to separate out the locking into a separate lock manager, and the file I/O stuff into its own class because I felt that it was warranted and produced more cohesive classes. My Data class was then a facade over the top of these.
I also chose to present a different interface to the client program, which allowed the client to not have to care about whether it was dealing with a local or remote database.
At the end of the day, you have to be able to justify what YOU choose to do. As long as you meet the requirements in YOUR instructions, and can justify what you've done, you should be fine.