Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!
  • 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Hey, People, please resond to this question !!!!!!!!!

 
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How should the program know if it is to be run in local or remote mode ??
I am using a command line 'String' parameter with values 'local' or 'remote'. Is this OK ?
I know that instructions with the assignment clearly state acceptable command line parameters which are 'DNS name of the server', 'Port number', 'Data file name', 'codebase property', and policy file. But instructions also say that '... the program must accept an indication that a local database is to be used ....'. Doesn't it mean that one of the parameters could be mode; i.e. local or remote ??
 
ranger
Posts: 17346
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
Maybe, but I just have one argument to my client, and that is a URL, if they want to run in Remote mode, otherwise no value is passed to run in Local mode.
Something as simple as that is fine.
Mark
 
Ranch Hand
Posts: 1209
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

most of us have the GUI (client) decide in what mode the application needs to be used.
The remote port and machine can be accepted from the client.
karthik
 
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I give IP in command line for a target machine & I check for if it is the same as the local machine, if it is same, I am giving choice as selecting Standalone or Server mode of an application.
To my client, I send to the constructor depending upon selection, remote/local mode of operation. with second parameter as IP, which in local mode sent as null.
[This message has been edited by Shivaji Bhosale (edited November 25, 2001).]
 
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Personnally I would not go against what the spec says. It says it must only take the following five command line arguments but you are adding one not in the list. They can be pretty picky when they mark the exam. What i did was non-networked mode was only one argument the location of the db and remote mode took two arguments, 1.serverip and 2. port.
You could also provide a Gui.
Trevor
 
Rasika Chitnis
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you all for answering my question !!! I finally decided to derive the mode from number of command line parameters, one parameter (database file name) means local mode, two parameters (host name and port number) mean remote mode.
Thanks again !!!
 
You may have just won ten million dollars! Or, maybe a tiny ad.
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic