Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Database location configurability

 
Robin van Riel
Greenhorn
Posts: 20
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,

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)

Thanks in advance!

Cheers,
Robin.
 
Helen Ma
Ranch Hand
Posts: 451
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Anayonkar Shivalkar
Bartender
Posts: 1557
5
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Robin van Riel,

Welcome to CodeRanch!
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 hope this helps.
 
Robin van Riel
Greenhorn
Posts: 20
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the warm welcome and the advice .

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).

Cheers,
Robin.
 
Roel De Nijs
Sheriff
Posts: 9835
103
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Robin van Riel wrote: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).

Don't forget the port number the RMI server is running on.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic