Hi, I didn't understand at all. In my assingement see I the next sentences: Your programs must not require use of command line arguments other than the single mode flag, which must be supported. Your programs must not require use of command line property specifications. All configuration must be done via a GUI, and must be persistent between runs of the program. Such configuration information must be stored in a file called suncertify.properties which must be located in the current working directory. Does this mean that I must create a new GUI (JFrame) to change the values of the suncertify.properties file. And this JFrame must be called by the MainApplication JFrame? Thanks Baris Dere
IMO minimum configuration you need is: default(or last) db file for server|alone, default(or last) port for server, default(or last) host ort for client. And you do not need dedicated GUI to manage these properties - you load them at startup and use for JFileChooser and other dialogs, and update them later. I know that you'll get more opinions on configuration - like using separate dialog, storing GUI layout information etc. IMO you should implement only that is required, no more.
If the question you're asking is 'do I need to write a seperate app to edit the properties file' then no. I prompt the user with several dialogs when the app loads asking them for configuration details (these details are populated with default values retrieved from the properties file if it exists). You could start the app and have a configuration meenu option to access the same info. its all really down to what you think would be the most intuitive.
I've set it up this way: Upon start up, if the suncertify.properties does not exist, a JDialog pops up with default values. User can then change and save them. After close of this dialog, a controller class will take the settings and call for a remote object reference(I choose RMI) if the mode specified is nothing or "server". After the program starts up, a button can be clicked to edit the settings. And the change will require a restart of the program.
storing GUI layout information etc. IMO you should implement only that is required, no more.
I choose to store two more settings: location and dimension of the client window. Hope it is not considered to be a devation. Bing
Joined: Mar 23, 2004
Hi guys, Thanks for your responds. I have a default suncertify.properties file with default arguments. dbfilename= serverhost= serverport= serverhostname= I use for the server and also for the client the same suncertify.properties file. Is this OK? Thanks Baris Dere
I use for the server and also for the client the same suncertify.properties file. Is this OK?
It will be the same suncertify.properties file in case client and server are started from the same directory on the same machine. It can happen and it's not under your application's control. So what about prefixing your properties with "server.", "client." and "standalone." (or any other of your own) to avoid conflicts? Regards, Phil.
subject: All configuration must be done via a GUI ??