• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Is database name really needed as command line parameter ?

 
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author
Posts: 3252
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 3252
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic