• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Local database path

 
Mike Segal
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everybody!

I could not find a clear answer on my question, which is:

Quotation: "the program must allow the user to specify the location of the database, and it must also accept an indication that a local database is to be used"

What does "accept an indication" mean? Is that enough just to use a textfield label like "Enter local database path" for the alone and server program modes? Or a check box must be provided? If the second is right what would be the logic for that?

Thanks.
 
Mark Smyth
Ranch Hand
Posts: 288
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Its a confusing and unhelpful statement alright. A textfield or JFileChooser is fine for selecting the location of the data file. The indication that a local database is to be used is just the "alone" flag at the command line.

Mark
 
Mike Segal
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mark,

Thanks for the answer. Still the matter is not clear to me. Let's say we are in the "alone" mode. Database file can be located on the local host or on any other host in the network. In this case, do I need to provide an option (a check box, for example) so that a user could define local/remote location of the database? From my point of view this is unnecessary, but what is the meaning that they put in the assignment? :roll:
 
Mihai Radulescu
Ranch Hand
Posts: 918
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mike & Mark

I also have this phrase in my specifications, so in my configuration dialog I have a two radio buttons one for local and one for remote, each of this buttons toggle the local/remote configuration panel.
So if the user starts in standalone mode the configuration dialogs pops up and it with the local button selected, at this point the user can still change the
operation mode to remote (and if the server it running it may get some results). The same logic if the user starts in remote mode.

Regards M.
[ January 04, 2007: Message edited by: Mihai Radulescu ]
 
Mark Smyth
Ranch Hand
Posts: 288
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Mike Segal:
Hi Mark,

Thanks for the answer. Still the matter is not clear to me. Let's say we are in the "alone" mode. Database file can be located on the local host or on any other host in the network. In this case, do I need to provide an option (a check box, for example) so that a user could define local/remote location of the database? From my point of view this is unnecessary, but what is the meaning that they put in the assignment? :roll:


I think that the simplest solution would probably be be just to assume that in local mode you have a local copy of the database file and that if you need to open a file over the network that there should be a database server running on that machine.

Although as far as I can see (and I have never tested this), if you open up a file over the network in local mode using its network path this should work just fine without having to make any special allowance for it.

Originally posted by Mihai Radulescu:
Hi Mike & Mark

I also have this phrase in my specifications, so in my configuration dialog I have a two radio buttons one for local and one for remote, each of this buttons toggle the local/remote configuration panel.
So if the user starts in standalone mode the configuration dialogs pops up and it with the local button selected, at this point the user can still change the
operation mode to remote (and if the server it running it may get some results). The same logic if the user starts in remote mode.

Regards M.

[ January 04, 2007: Message edited by: Mihai Radulescu ]


I let the user start in either local or network mode only with no option to change. I had a custn JDialog for the properties that accepted the mode flag and showed either the local or network properties depending on how the app was started. Originally there was an option to let the user close a connection and then re-open either a local or network connection on the fly. However I eventually took it out as I felt it was making the GUI code unnescesary complex (I may have found a bug or two also ). Your solution is a nice feature however that is user friendly (and also more importantly also sticks to the spec).

Regards,
Mark.
 
Mike Segal
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,

Mark, thanks for your comments, I feel much better now. I also agree that it's better not to implement re-connection on the fly and not only because of the complexity but because the assignmend (at least mine) does not require that feature and states clear enough that the program's mode is defined by a command line parameter. If a user can override the mode from the GUI than what's the point to use command line parameter at all.

Mike
 
Mike Segal
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
P.S. Actually one thing can happen. Let's say a user has started the program in Client mode and specified database path as a remote server host name. After that, a user restarted application but in Alone mode (why not?). The program will try to open a local physical database file using remote path from previous session and will crash.

It seems to me now that "accept indication" phrase points to this scenario. We need to check consistency of modes between sessions using local/remote parameter.

Mike
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic