I have two problems with properties management:
Thanks in advance.
is it worth to waste time by implementing gui configuration persistence (window size and location, columns order etc.)? currenlty I store only database file path, host name and port (different for each mode) - is it enough (for this assignment only, since I'm sure that this couldn't be enough for real application)?
As I tend to say a lot in my replies:- These problems are design decisions that you have to make and document your reasoning. Some people will store window size and location etc. You could simply make window size a fixed percentage of screen size and always centered. You decide but persist what they ask you to persist - no point going over spec!
how to handle situation, then server and client applications are started in the same machine from the same folder - only one of them will get properties saved? I could implement some kind of refresh-before-save for Properties, but event with this approach there is no possibility to synchronize different VMs for properties file access? maybe I just need to mention this problem in choices and userguide (do not use networked mode for single workstation)?
One property file can have more than 3 variables. eg. ServerFile, LocalFile, ServerHost, NetworkHost, ...
thanks for your replay. I think I'm going to leave simple configuration, since simplicity is the main target (as it is stated in instructions document). As for properties - yes, I have different attributes for each mode, but check the following sequence:
1. start server - server loads properties file and displays file opening dialog
2. leave serer with opened dialog and start client - client loads the same properties file and opens network setup dialog
3. now select file for server and proceed - server updates properties file
4. now setup network cfg for client - client updates properties file - BUT server configuration gets overwritten with previously loaded one!
Do we need a gui for the user to change these properties, or can we document that they must use a text editor.
Jay: I think this has been mentioned by another thread. Personally I add a control to my main gui which will bring up a dialogbox. The extended JDialogBox will read in the properties (via Properties object's load() method) and add labels and textfields with the the values read in.
There are then also controls on the dialog for user to change and save them.
I don't think as to this matter there is a right or wrong. Just a matter of your choice and your reasoning(which I an not good at at all).
[ June 15, 2004: Message edited by: Bing Yuen ]