• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Persistent configuration

 
Bartender
Posts: 2236
63
IntelliJ IDE Firefox Browser Spring Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 2236
63
IntelliJ IDE Firefox Browser Spring Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic