Originally posted by Eric Chang:
I'm practically done with the local standalone version of my assignment, and unfortunately, I started thinking about my design decisions and having a few second thoughts. One of my decisions was to only read from the datafile upon opening up the client, and then maintaining the records in an ArrayList. And upon the updating of a record (deletion, creation, etc.), I would update the object in the ArrayList as well as update the data file at that time. And this ArrayList would obviously be maintained on the server.
Now, for some reason, I'm thinking that maybe it would have been better to always read from the datafile upon opening a record for updating, and not maintaining anything in an ArrayList at all. That would save me the trouble of hoping that the ArrayList and the datafile never get out of synch.
Any thoughts on the issue?
Also, another much more minor question...the Java Tutorial has a nice example of using SpringLayout, with an accompanying SpringUtilities.java for layout out components...what would be the pros and cons with using that code example?
For every modification I write to the file again, but I never perform another read. This is clearly stated in the userguide.txt