Win a copy of AWS Security this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Persistent configuration

 
Bartender
Posts: 2230
63
IntelliJ IDE Firefox Browser Spring Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Bartender
Posts: 2292
3
Eclipse IDE Spring Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Paweł Baczyński
Bartender
Posts: 2230
63
IntelliJ IDE Firefox Browser Spring Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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.
 
Slime does not pay. Always keep your tiny ad dry.
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic