File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes All configuration must be done via a GUI ?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "All configuration must be done via a GUI ??" Watch "All configuration must be done via a GUI ??" New topic
Author

All configuration must be done via a GUI ??

Baris Dere
Ranch Hand

Joined: Mar 23, 2004
Posts: 31
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
Gytis Jakutonis
Ranch Hand

Joined: Feb 02, 2004
Posts: 76
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.
Lloyd Shove
Greenhorn

Joined: Apr 24, 2004
Posts: 15
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.
Ben Zung
Ranch Hand

Joined: Mar 25, 2004
Posts: 109
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
Baris Dere
Ranch Hand

Joined: Mar 23, 2004
Posts: 31
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
Philippe Maquet
Bartender

Joined: Jun 02, 2003
Posts: 1872
Hi Baris,
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: All configuration must be done via a GUI ??
 
Similar Threads
suncertify.properties
NX:packaging suncertify.properties
Several questions about SCJD instructions
Read file from Jar - Exception
NX:Some Questions(URLyBird1.3.2)