• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Something about property file.

 
Zhixiong Pan
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ranchers,

I am nearly submit. One question about property file remains unclear to me.I only used:
AloneDBFile=props/db-1x3.db
ClientPort=5099
ServerDBFile=props/db-1x3.db
ServerIP=localhost
ServerPort=5099
As you can see, there are total 5 properties. Some of them may need to be changeable from gui. So what are they?
 
Mark Smyth
Ranch Hand
Posts: 288
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Zhixiong Pan:
Hi ranchers,

I am nearly submit. One question about property file remains unclear to me.I only used:
AloneDBFile=props/db-1x3.db
ClientPort=5099
ServerDBFile=props/db-1x3.db
ServerIP=localhost
ServerPort=5099
As you can see, there are total 5 properties. Some of them may need to be changeable from gui. So what are they?


Hi,
All of the properties mentioned above could change at some point and therefore should be editable.
Regards,
Mark.
 
Zhixiong Pan
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guy,
Thank you.
BTW, need I add property of ServerAddress into the property file? If it is necessary, be pleased to show the reason.
 
Mark Smyth
Ranch Hand
Posts: 288
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Zhixiong Pan:
Hi guy,
Thank you.
BTW, need I add property of ServerAddress into the property file? If it is necessary, be pleased to show the reason.


My properties are

//local mode
local.filelocation

//network mode
network.host
network.post

//server mode
server.filelocation
server.port

I saw one person had a server.host property for the event that the server machine had multiple IP interfaces but I didn't use such a property myself.

Regards,
Mark.
 
Zhixiong Pan
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mark,
Should all the five properties be able to modified under the client UI, even if "ServerPort" and "ServerDBFile" are just business of the server.
 
Mark Smyth
Ranch Hand
Posts: 288
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Zhixiong Pan:
Hi Mark,
Should all the five properties be able to modified under the client UI, even if "ServerPort" and "ServerDBFile" are just business of the server.


No I would just show the properties relevant to the mode you are starting the app in. So just show a local client the location property, for a network client show the ip and port properties and for the server show the port and location properties.

Regards,
Mark
 
Zhixiong Pan
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mark,
Please take your time to think for a while on my following strategy.
In my package suncertify.client, I will create a ServerFrame to configure server related properties and start the RMI server.
In my ClientFrame under the same package, I want to add one more parameter for its constructor to sign whether remote or local.
 
Mark Smyth
Ranch Hand
Posts: 288
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Zhixiong Pan:
Hi Mark,
Please take your time to think for a while on my following strategy.
In my package suncertify.client, I will create a ServerFrame to configure server related properties and start the RMI server.
In my ClientFrame under the same package, I want to add one more parameter for its constructor to sign whether remote or local.


Looks good to me I had my server JFrame in a seperate package but other than that that is exactly how I constructed my server and client GUIs. You should also have another class with your main method to actually launch the application and create the appropriate JFrame.

Regards,
Mark
 
Zhixiong Pan
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mark,

How many packages do you have? I guess 4, such as db, business, client and server. May be your server package has the only content of server JFrame.
My previous way to put server JFrame in client package was a bit confused in sense.
BTW, I did have a MainRun app in client package for different launching according to parameter.Thanks any way.
 
Mark Smyth
Ranch Hand
Posts: 288
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Zhixiong Pan:
Hi Mark,

How many packages do you have? I guess 4, such as db, business, client and server. May be your server package has the only content of server JFrame.
My previous way to put server JFrame in client package was a bit confused in sense.
BTW, I did have a MainRun app in client package for different launching according to parameter.Thanks any way.


Actually my server GUI was in the same package as my client gui oops :roll: . I also had four packages db, local network and gui so it is pretty much the same as what you did.
regards,
Mark.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic