Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Is database name really needed as command line parameter ?

 
John Chien
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
According to Sun's assignment, we can use database name as one of the command line parameter.However, I am wondering about its necessity.
In a real time application, the database name is always encapsulated by the server implementation. No matter if the server is remote or local.
This encapsulation can be achieved using system property file. Thus we do not need to worry if the database location or name got changed.
Why does SUN allow us to use it as part of the input parameter ? Can we remove it from the command line parameter ?
John Chien
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here the word "can", means an option. If you want to you "can" use this command line. It doesn't mean you "have" to.
I can see where sometimes when english isn't your first language that this can be confusing. So don't worry about it.
Some people have a screen that allows the user to select the data file and some other things, others put it on the command line, and some people like me hardcoded the db.db file location because the instructions also said I could.
Mark
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need the location of the database file in local mode. Obviously, in networked mode, clients shouldn't care about where the file lives.
As to your last question, I'd suggest you stick to the letter of Sun's requirements regarding the command line.
- Peter
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"I'd suggest you stick to the letter of Sun's requirements regarding the command line"
Does that mean that you think the requirements in the Instructions.html states that you must use the command line for the location of the db file?
Mark
 
John Chien
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mark,
Thank you for the answer.
However,please do not insult me about my English. I DO know what "can" mean. I am just wondering the reason Sun allows (can use) the database name as commandline parameter. I do not think we can find this in the real application.
John Chien
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Mark Spritzler:
[QBDoes that mean that you think the requirements in the Instructions.html states that you must use the command line for the location of the db file?[/QB]
Ah. Ok, I was probably confused. No, of course not; you can use a command line parameter, or you can pop up a dialog box (not a good idea IMHO), or you can hardcode a relative path. You wouldn't be able to do the same thing for the server though.
Why I don't think dialog boxes are a good idea? Well, apart from the fact that they are more work , they also are a really poor fit for my interpretation of the business problem. I don't see the point of forcing a travel agency's sales assistant to know the location of a file or a server! You want the techie who installs the software to configure where the file and/or server lives, and not bother the sales people with it.
- Peter
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
However,please do not insult me about my English.

No, I wasn't trying to insult you, I was just trying to help. Please accept my apology.
Mark
 
John Chien
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK. I think I got the point. This is not an application for techie. This is really an application for Sales or business person who may not have an assistence around.
John Chien
 
BJ Grau
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't think of this as a real-world application, it is only symbolic of a real application.
Don't treat it as a real product because it is about as real as the first Hello World program you wrote in BASIC back in 3rd grade; if you do this you will miss the whole point of the assignment.
The test here is not to see if you can make a flight booking system, it is to see if you can design and build an application using consistent application of good programming practices and style while satisfying some requirements that are simple, vague, precise, and ambiguous all at the same time.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic