This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes gui side commandline parameters Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "gui side commandline parameters" Watch "gui side commandline parameters" New topic
Author

gui side commandline parameters

Aruna Raghavan
Ranch Hand

Joined: May 14, 2002
Posts: 194
Hi fellow ranchers,
From reading the specification, it seems to me that one could write the gui such that the DNS name of the server, port number used by the server, data file names are all accepted as command line parameters. But the actual selection of local or remote mode is made from a gui option. I don't like this way of doing it- if the user does not enter the proper remote options but selects a remote mode from the gui, we will have to defer the error checking till he enters the mode.
#1 I would like to include local/remote mode selection in the command line options
or
#2 have DNS name of the server, port number used by the server, data file names and the remote/local mode all be entered on a gui.
Since #1 is not acceptable (spec says mode selection should be made available via gui), I would like to do #2.
Any suggestions?
Thanks,
Aruna.


Aruna A. Raghavan<br />SCJP, SCJD, SCWCD
John Smith
Ranch Hand

Joined: Oct 08, 2001
Posts: 2937

Since #1 is not acceptable (spec says mode selection should be made available via gui), I would like to do #2.

#1 is acceptable, at least in my spec. It says something to the extend that you may have two methods of starting GUI, one in local mode, one in remote, and you don't need to switch dynamically. Although I personally chose to implement "on the fly" switch, your #1 option is also perfectly fine:
java -jar client.jar db.db (local mode)
java -jar client.jar flyHighServer 1099 db.db (remote mode)
Eugene.
Aruna Raghavan
Ranch Hand

Joined: May 14, 2002
Posts: 194
Thanks Eugene, I just finished doing the screens for the mode selection and other related parameters.
I am wondering how did your program get the policy file?? From the gui or command line?
Aruna.
John Smith
Ranch Hand

Joined: Oct 08, 2001
Posts: 2937

I am wondering how did your program get the policy file??

The consensus in this group is not to use policy files, security managers, codebase parameters, dynamic stub downloading, or even classpath parameters. It would make it much easier for you and for your assesor if your server and client can be started as simple as this:
java -jar server.jar
java -jar client.jar
To this list of "toy features" above, I would also add server GUI, graceful server shutdown, Unreferenced, lock timeouts, cleaning stale client connections, reconnecting to server in case of error, and all other similar features that add absolutely nothing to clarity of design or reusability of your code.
On the other hand, an application level MVC (or some other cohesive control scheme), and ability to connect to multiple databases is a must.
Eugene.
HS Thomas
Ranch Hand

Joined: May 15, 2002
Posts: 3404
Eugene,
To this list of "toy features" above, I would also add server GUI, graceful server shutdown, Unreferenced, lock timeouts, cleaning stale client connections, reconnecting to server in case of error, and all other similar features that add absolutely nothing to clarity of design or reusability of your code.

do you mean that the above list of features are
"extra" to the requirements, and do not result in additional marks ?
John Smith
Ranch Hand

Joined: Oct 08, 2001
Posts: 2937

do you mean that the above list of features are
"extra" to the requirements, and do not result in additional marks ?

Yes, that's exactly what I mean.
Eugene.
HS Thomas
Ranch Hand

Joined: May 15, 2002
Posts: 3404
Eugene,
How have you come to this conclusion ?
Perhaps you've read Kathy Sierra's book ?

Having pulled back to Assignment Earth from the "galactic core" as Peter put it, I could do with all info in saving myself a few months before submitting the assignment.
I could always add the toy features later. After all, this is a good place to hang out.
regards
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: gui side commandline parameters
 
Similar Threads
command line arguments
gui client command line arguments
Please Help! Clarification on Local vs Remote Approach.
Urgent-Please give some hints
Hey, People, please resond to this question !!!!!!!!!