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
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
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
"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
Joined: Feb 06, 2003
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
Joined: Apr 20, 2000
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
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.
subject: Is database name really needed as command line parameter ?