Well, although I'm new to this forum, I actually have already written most of my SCJD project (URLyBird). Just going over some of the issues I've been through. So I have several questions, any insight will be greatly appreciated.
My first question would be about the configuration of the data access server.
Clearly, when running in stand-alone mode, no such configuration is needed. The GUI simply prompts the user for a file name (using a ) and that's it.
However, some questions arise regarding running the program in "server" mode.
What I did (so far. This is the part that I haven't quite completed yet) is just use hard-coded values for the following items:
* Listening port * Database file name
And when the program runs as server, a small, empty frame pops up and minimizes itself immediately. This frame creates a thread for running the listener. The reason I chose to use a frame instead of just a console application is the ease of coding the Shutdown Handler. In the "frame" way, when the user chooses to close the frame it's rather easy to shut-down everything tidily; whereas if it was a console application, handling a Ctrl-C event is trickier.
Since the spec did not specify which items (if at all) need to be configurable, then it is theoretically OK to hard-code the listening port (I'm using sockets) and the data filename as I did.
However still it doesn't seem right to me.
How about you guys? Are you showing some GUI when running the program in "server" mode, so the user can configure it?
"Large Vehicles Require More Room" - Highway 69 en route to Sudbury, Ontario
Originally posted by Isaac Shabtay: How about you guys? Are you showing some GUI when running the program in "server" mode, so the user can configure it?
I provide a small GUI that shows the network and file status and provides menu items to configure these, shut down the server, and display help. You could catch HeadlessException and just run as a console app if that's thrown when creating the JFrame.