I'm currently working on the Bodgitt and Scarper assignment.
The following requirement puzzles me a bit:
"The program must allow the user to specify the location of the database in both standalone and network mode and persist the db configuration details in suncertify.properties file. The application must read the properties file to determine the location of the db and display the data from the db."
Could this simply mean the location of the database file should be defined and read from the properties file, or should the GUI offer the end user the possibility to configure the DB location?
(even though the latter option would only make sense when running the standalone version of the application)
In the SCJD Exam J2SE 5 study guide, the GUI let the user specify the location where the database file is. I think we can use this as an example for our project.
I have not started working on the assignment yet. But I think we can learn from the study guide.
The program must allow the user to specify the location of the database in both standalone and network mode
This means that, when user is running the application for first time (in any mode), it MUST allow user to configure the DB location.
and persist the db configuration details in suncertify.properties file. The application must read the properties file to determine the location of the db and display the data from the db
This means that, your options MUST be saved in a property file, and that file MUST be read during subsequent runs. Thus, in your next run, the text box etc. MUST already contain DB location details - which you can accept and continue, or which you can again edit and continue. Please note that all such changes to DB location MUST be updated in property file.
I guess it wouldn't make much sense to let the end user determine the location of the DB file, while they are actually using the client.
I can imagine it makes sense to let the end user determine what service to connect to, though (e.g. by making the URL of the RMI server configurable).
So I'll add both these variables to the properties file, and let the RMI server read from the same properties file (even though it might reside on another server in practice).