Hi, I'm starting to work on my project. for now it looks big and complicated... I have some questions about the sample project in Max's book before I begin: 1. (If I understand correct) the sample project in the book is using a database folder, with a seperate file for every record. is this approach applicapble for SCJD? if not what is the best approach (search in a single file? write a single file in a "hashed" order? cash the records or maybe somthing else)? 2. I see in the sample project some usage of "status" return values. is this considered to be a good approach for Java, or should I stay with exceptions only? BTW I'm doing URLyBird.
[Andrew: Changed subject to a more Meaningful Subject Line] 10x, niko [ August 22, 2005: Message edited by: Andrew Monkhouse ]
Remember every Must (MUST) be adhered to or automatic fail.
The requirments state that you Must implement the given data access Interface, that Interface specifies the return values and Exceptions, so I guess your stuck with Exceptions vs Statuses, I would have liked to do it with Statuses as well. I believe that most people would. I suppose you could implement the Interface and then use your own methods, but I think the grader of the assignment would not like that too much.
This assignment can be broken down into smaller parts. Data Access, GUI, Server, I believe the best place to start is with the Data Access, as every thing else rests on top of it.
Fist off, save everything, burn your assignemnt on to a worm cd and keep it in a safe place, as you are required to upload your assignment with the original db.
Secondly, the database has been given to you, it has a bunch of header informnation about the number of fields, etc... After the header each row is fixed length (like a COBOL Copy Book) so if you take the length of the header into the equasion you can jump all around by record numbers. The best way (I know) is to use a RandomAccessFile to open the db with.
I would suggest, that you concentrate on opening the db, reading records from it, displaying fields from the records (all via console for now - no GUI), writing records (delete and recycle as well) to it (after formation, validation, padding, etc...), that will give you your methods for the Interface that you are required to implement.
Next, put together your GUI and access the db from it locally, doing everything from up above (plus displaying records from withing a JTable)
Next, start on your Server and remote data access.
I foolishly went the hard route early - Multi-Threaded Socket Server, interacting with a Multi-Threaded GUI and had to rewrite everything when it came to implementing the local data access methods.
Also, when you have a question, read the previous posts in this forum, as most of my questions were answered without having to ask.
I hope this helps, and remember, the above is just my opinion, I'm sure that there is more than one way to skin a this Cat. Tom