wood burning stoves 2.0*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Persistent configuration Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Persistent configuration" Watch "Persistent configuration" New topic
Author

Persistent configuration

Paweł Baczyński
Bartender

Joined: Apr 18, 2013
Posts: 837
    
  14

I am finishing my assignment and possibly overthinking this so be placable
My assignment instruction says
All configuration must be done via a GUI, and must be persistent between runs of the program.

1. Do I have to store the properties even if user didn't start client or server? (They typed something in text fields but closed application without actually running client or server)
2. If so, do I have to save everything user types in a textfields even if it doesnt make any sense? Like "xxxxxx" as a port number? (I don't filter what an user can put into text field. I just validate after they click OK)
3. Should I store empties or other defaults for properties not relevant to the mode that was run? For example: an user runs network client mode. Should I store "" as a database file location?

I know that your answer will probably be that requirements don't state that so I can do whatever I want and justify this in choices.txt
Just wanted to know your opinion.


Formely Pawel Pawlowicz
Roberto Perillo
Bartender

Joined: Dec 28, 2007
Posts: 2258
    
    3

Greetings, Pawel!

Champ, you're more than welcome to come to us and ask our opinion at any time!

Well, what you can do is, you don't have to save anything if the user didn't start the client or the server. And if the user does press the OK button, you can save the data only if it made sense, which means that your .properties file will only the last valid data provided.


Cheers, Bob "John Lennon" Perillo
SCJP, SCWCD, SCJD, SCBCD - Daileon: A Tool for Enabling Domain Annotations
Paweł Baczyński
Bartender

Joined: Apr 18, 2013
Posts: 837
    
  14

Roberto Perillo wrote:Well, what you can do is, you don't have to save anything if the user didn't start the client or the server. And if the user does press the OK button, you can save the data only if it made sense, which means that your .properties file will only the last valid data provided.

That's what I did . Just wanted to make sure it is OK . Thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Persistent configuration
 
Similar Threads
B&S server: datafile location
Multiple Instances of Standalone
NX: suncertify.properties
execution and executable Jar question for SCJD
about properties.txt problem