This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

NX: Graphical server mode UrlyBird

 
Yanick Labelle
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, from what I understood from the spec, there are 3 modes:
alone:
The client with gui starts and manages a local data file.
The path to the datafile must be configurable from the user interface.
<no arguments>:
The client with gui starts and connects to a network server.
The IP/Machine Name and port must be configurable from the user interface.
server:
The network server starts. My question was: how do you tell the server on which port to listen, and which data file to open, to report errors... fatal errors...
My supposition was that since everything must be configurable from the user interface, the network server must have a gui. Maybe with a preferences dialog asking for the port and data file to open. And maybe also pretty buttons which permit the administrator to start/pause the server. Also, we could add a dynamic log in the window to tell what is currently happening on the server... (But I ask myself "why is it that I never heard about those things on this forum? It may be that no one cared to do those things... am I reflecting too much???").
Also, if anyone sees something unlogical with my description of the 3 (standalone client, network client, server) modes, let me know!
 
Satish Avadhanam
Ranch Hand
Posts: 697
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Yanick
Originally posted by Yanick Labelle:
Hi, from what I understood from the spec, there are 3 modes:

Yep.

alone:
The client with gui starts and manages a local data file.
The path to the datafile must be configurable from the user interface.

Yeah. Basically you need to ask for the db file location in alone mode. You may want to check if its valid data file or not like checking the magic cookie or of that sort.

<no arguments>:
The client with gui starts and connects to a network server.
The IP/Machine Name and port must be configurable from the user interface.

In this mode, you may want to know the host name & port number where the server is listening.

server:
The network server starts. My question was: how do you tell the server on which port to listen, and which data file to open, to report errors... fatal errors...

In this mode you need to ask for the db file location and also the port where the server has to start listening.

My supposition was that since everything must be configurable from the user interface, the network server must have a gui. Maybe with a preferences dialog asking for the port and data file to open. And maybe also pretty buttons which permit the administrator to start/pause the server.

Well, exactly right. But I don't think we need to have a pause button that can pause the server. If you can do that, its great. Maybe you want to add one more button to stop the server. This looks good on the GUI besides start server button

Also, we could add a dynamic log in the window to tell what is currently happening on the server... (But I ask myself "why is it that I never heard about those things on this forum? It may be that no one cared to do those things... am I reflecting too much???").

Yanick, there threads on the mode flag. But what exactly happens is most of the times, the thread starts out with one problem discussing and ends up discussing a completely different problem. So basically at/most times the post name necessarily does'nt reflect what's in it.

Also, if anyone sees something unlogical with my description of the 3 (standalone client, network client, server) modes, let me know!
I think you got the complete idea about the modes. If you still want to check out, you can have a look at the following thread.Mode Flag Confusion
Also in that thread, if you also can look at the link given by Terry, everything should be very clear.
Good Luck.
 
Steven Hoodless
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yanick,
I used a configurable Server GUI. If I was doing SCJD again I'd pull the configuration Dialog out into a seperate start-up process (before you even create the Server or Client).
This Dialog process could load up the default or stored configurations and allow the user to modify the fields. It would only display the fields for the chosen mode ("server", "local", "") and then start either the Client or Server application.
A Client may change to another DB or networked server so may need to reaccess the configuration process.
The Server would need no further configuring. You couldn't change it to point at another DB while running (why would you when you potentially have Clients attached?). To change to another DB you'd exit and restart the app..
Does your customer really require server pause/start buttons and a window of Server processing details? If you go over spec. you will waste your time and your effort and potentially points . In the real world, will your customer be happy that the system is delivered late even if he gets an unrequired but flashy JTextArea with pretty JButtons?
What's left?
You've configured the server, pulled out all the unnecessary fooling around and really all you need is an exit button or even simpler no server GUI at all just a command line with Ctrl-C to exit! Exceptions could be passed back to the GUI Client, logged and worked around or if they were serious enough bring the server down.
This would free you up for the weekend and give you more time to work on your Client GUI design.
 
Xie Ruchang
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
All those things you talked about the server, I have implemented. I thought I was doing great until I got 20/40 for my server.
Doesn't pay for the amount of work. It seem to me that the more I implement, the more they penalised. Just my feeling. Keep it simple and stupid.
Best Regards
 
Yanick Labelle
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, that's a great idea, I was thinking about having a menu with a preferences dialog (with all the logic to reconnect to the new database if the user changes the properties in the middle of execution...)
But with this, you ask the user the path to the database in standalone mode, the adress/name and port of the server in the network client mode, and the database path and port to listen to in network server mode. If one of these parameters is incorrect, the application will not start and continue spitting error dialogs until the user enters something correct.
Then, when the (standalone client, network client, network server) is started there is no way of changing these parameters. One more thing, to respect the specifications, the values provided in the startup dialog will be saved in a preferences file and used as default values on next startup.
Thanks!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic