aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes suncertify.properties Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "suncertify.properties" Watch "suncertify.properties" New topic
Author

suncertify.properties

Gytis Jakutonis
Ranch Hand

Joined: Feb 02, 2004
Posts: 76
Hello,
I have two problems with properties management:

  • is it worth to waste time by implementing gui configuration persistence (window size and location, columns order etc.)? currenlty I store only database file path, host name and port (different for each mode) - is it enough (for this assignment only, since I'm sure that this couldn't be enough for real application)?
  • how to handle situation, then server and client applications are started in the same machine from the same folder - only one of them will get properties saved? I could implement some kind of refresh-before-save for Properties, but event with this approach there is no possibility to synchronize different VMs for properties file access? maybe I just need to mention this problem in choices and userguide (do not use networked mode for single workstation)?


  • Thanks in advance.
    Steven Hoodless
    Ranch Hand

    Joined: Mar 23, 2004
    Posts: 64
    Gytis,


    is it worth to waste time by implementing gui configuration persistence (window size and location, columns order etc.)? currenlty I store only database file path, host name and port (different for each mode) - is it enough (for this assignment only, since I'm sure that this couldn't be enough for real application)?



    As I tend to say a lot in my replies:- These problems are design decisions that you have to make and document your reasoning. Some people will store window size and location etc. You could simply make window size a fixed percentage of screen size and always centered. You decide but persist what they ask you to persist - no point going over spec!


    how to handle situation, then server and client applications are started in the same machine from the same folder - only one of them will get properties saved? I could implement some kind of refresh-before-save for Properties, but event with this approach there is no possibility to synchronize different VMs for properties file access? maybe I just need to mention this problem in choices and userguide (do not use networked mode for single workstation)?


    One property file can have more than 3 variables. eg. ServerFile, LocalFile, ServerHost, NetworkHost, ...

    Steven


    SCJP, SCJD, SCWCD.
    Gytis Jakutonis
    Ranch Hand

    Joined: Feb 02, 2004
    Posts: 76
    Hi Steven,
    thanks for your replay. I think I'm going to leave simple configuration, since simplicity is the main target (as it is stated in instructions document). As for properties - yes, I have different attributes for each mode, but check the following sequence:
    1. start server - server loads properties file and displays file opening dialog
    2. leave serer with opened dialog and start client - client loads the same properties file and opens network setup dialog
    3. now select file for server and proceed - server updates properties file
    4. now setup network cfg for client - client updates properties file - BUT server configuration gets overwritten with previously loaded one!
    Jason Hocker
    Ranch Hand

    Joined: Jul 23, 2003
    Posts: 132
    Do we need a gui for the user to change these properties, or can we document that they must use a text editor.
    Ben Zung
    Ranch Hand

    Joined: Mar 25, 2004
    Posts: 109
    Do we need a gui for the user to change these properties, or can we document that they must use a text editor.


    Jay: I think this has been mentioned by another thread. Personally I add a control to my main gui which will bring up a dialogbox. The extended JDialogBox will read in the properties (via Properties object's load() method) and add labels and textfields with the the values read in.
    There are then also controls on the dialog for user to change and save them.
    I don't think as to this matter there is a right or wrong. Just a matter of your choice and your reasoning(which I an not good at at all).

    Bing
    [ June 15, 2004: Message edited by: Bing Yuen ]
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: suncertify.properties
     
    Similar Threads
    suncertify.properties conflict on single machine in network mode
    almost finished - few issues left
    configuration in suncertify.properties
    suncertify. properties -- Network / non-networked mode
    persistent suncertify.properties