Your choice of RMI or serialized objects will not affect your grade, but no other approach is acceptable. In either case, the program must allow the user to specify the location of the database, and it must also accept an indication that a local database is to be used, in which case, the networking must be bypassed entirely
All configuration information must be done via a GUI, and must be persistent between runs of the program. Such configuration information must be stored in a file called suncertify.properties which must be stored in the current working directory.
The mode flag must be either "server", indicating the server program must run, "alone" indicating standalone mode, or left out entirel, in which case the network client and GUI must run.
Can I please request everyone to keep their comments confined to ONLY the URLy Bird assignment?
I can imagine Andrew rolling his eyes
Quote number 1 goes on to finish the unfinished sentence above as..", and it must also accept an indication that a local database is to be used, in which case, the networking must be bypassed entirely." . This is somewhat in conflict with the first part of the sentence discussed in point 1 above. I think that Quote # 3 clearly and sufficiently overrides this since it says: "The mode flag must be either "server", indicating the server program must run, "alone" indicating standalone mode, or left out entirel, in which case the network client and GUI must run."
When the program runs in the network mode, only the first two name/value properties, i.e., servername=localhost, and serverport=1099 need to be used. The third entry, i.e., datafilepath=C:\SCJD\db-1x1.db will be ignored. Conversely, in the standalone mode, the third entry will be used and the first two will be ignored.
Therefore, my conclusion is: THERE IS NO NEED TO DEVELOP ANY GUI SCREENS FOR THE SERVER-SIDE ONLY FOR THE CLIENT SIDE AND SAVE ALL THE INFORMATION IN THE SUNCERTIFY.PROPERTIES FILE WHICH RESIDES IN THE CURRENT WORKING DIRECTORY.
I agree there is a case to lock the properties file but I'm not sure if it's overkill or not.
The reason being is that I do not have two mice, two keyboards and four hands. Therefore I think the chance of updating the properties on the client and server at the same time are very slim.
I think the chance of updating the properties on the client and server at the same time are very slim.
And anyway why would you ever practically want the client and server on the same machine if you have the alone mode.
What if (due to firewalls or similar) we need to specify a different port oon the server than on the client?
So if I were to tell you the IP address and port number to connect to me, you would not really know what IP address and port the web server is really on. All you know is the IP address and port number of my firewall/router.
There is a locking issue, because it's possible to start the server, a client and a stand-alone client from the same directory on the same machine (it's likely what the grader will do BTW).
You may assume that at any moment, at most one program is accessing the database file
I am really sure that we should NOT take care of locking a property file.
There is always something to "upgrate", but we cannot be prepared for everything.
One more issue:
I don't disable fields for ip and ports if working in stanalone mode. I just don't show it. There is opportunity in Max books sample to change the mode every time, but it is not required in the assignement. So, I whow this dials only on the start of client. As client know the desired mode from comand line a show different dialogs. I don't think it is breach of requirement, because the main window after that has no clue if it is remote/local mode.
[Andrew] So if I were to tell you the IP address and port number to connect to me, you would not really know what IP address and port the web server is really on. All you know is the IP address and port number of my firewall/router.
[Bharat]Sounds like a proxy-server to me.
By "the default menu from left hand top corner", do you mean the popumenu attached to the close box ? I am not sure it's possible to access it in Java, it should be platform-specific right ?
If nobody replies here, try the Swing/AWT forum. That's what I do when I have a technical question ...
It seems to me that this could be treated as just another case of the user choosing the "Quit" or "Cancel" button and abort or shut the server down?
I was born with webbed fish toes. This tiny ad is my only friend:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koophttps://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton