• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Am I being silly by taking the must too far? Andrews book confuses me.

 
Yucca Nel
Ranch Hand
Posts: 147
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was about to hand in my assignment until I noticed "server must start programatically". Fair enough the instructions do say the server MUST run when the runme.jar command is "server". BUT
they also say that if left blank the network client MUST run. Now how do you run the network without entering the host details? This step requires manual configuration and can not be avoided?
 
Roel De Nijs
Sheriff
Posts: 10446
137
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Yucca,

In my application this happens and i think that's what they expect (no manual editing of files, because that's not allowed):

If "java -jar runme.jar server" a window is shown with the appropriate configuration settings. if user enters these config settings and clicks on "start server" button the server is started.

If "java -jar runme.jar" a dialog is shown with the appropriate configuration settings. if user enters these config settings and clicks on connect, the main window application is shown (if the settings were valid of course)

If "java -jar runme.jar alone" a dialog is shown with the appropriate configuration settings. if user enters these config settings and clicks on connect, the main window application is shown (if the settings were valid of course)

Kind regards,
Roel
 
Yucca Nel
Ranch Hand
Posts: 147
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Fair enough. But what is the Must requirement saying here? In Andrews book he states that the server must start programatically. This could be understood as "When the server command is provided your server must start immediately and must not require a databse location or or port number to be specified." The MUST requirement that states the server MUST run also indicates that the server must run right away.

The network client will then ofc use the default server port and any allowance for the port to be specified is redundant.
 
Roel De Nijs
Sheriff
Posts: 10446
137
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yucca,

checked my instructions html file, but couldn't find anything like "server must start programatically". Is it really in your assignment instructions or is it just in andrew's book.

Kind regards,
Roel
 
Yucca Nel
Ranch Hand
Posts: 147
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Andrews book, but in my instructions....

The mode flag must be either "server", indicating the server program must run, "alone", indicating standalone mode, or left out entirely, in which case the network client and gui must run.


My impression is that at that very moment the server is to be running once the command is entered. Any steps that require a database to be browsed for or a port number to be specified indicate that your server is "not" running as instructed.
 
Roberto Perillo
Bartender
Posts: 2271
3
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Howdy, Yucca!

Just to give you a position, my approach was exactly like what my good buddy Roel explained above. When running the server (with java -jar runme.jar server), just let the user provide the settings you think are necessary, and with that information, start your server. Also, after my server is started, I just print on the console a message, like, "Server running, press Ctrl + C to exit".
 
Yucca Nel
Ranch Hand
Posts: 147
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you both. Appreciate the help.

Regards Yucca
 
Roel De Nijs
Sheriff
Posts: 10446
137
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Yucca,

From your quote from the instructions: "the server program must run", so that's what happens. My server program runs, it shows a window where configuration settings can be entered and then the server starts when user hits the "start server" button.

so in my interpretation there is a difference between the server and the server program. and the server program is started when parameter server is passed as program argument.

starting the server can't be done without having the necessary configuration settings (what is the server port number, where is the database file). So if you want to start the server directly, then someone has to manually edit a file to set the correct port number and the database location). And that's not allowed according to this quote from the instructions


You must not require manual editing of any files by the examiners.


And the most important thing
Roberto Perillo wrote:
my approach was exactly like what my good buddy Roel explained above

and Roberto passed already, so it's a valid approach (my assignment is in grading process at this moment, still 4-5 weeks to go)

Good luck with the essay exam!
Kind regards,
Roel
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic