I have the "Bodgitt and Scarper" assignment. I have some concerns if the application must be a single application or if it can consist of a client (started with parameter local or network) and a separate server.
From the assignment instructions:
The program must be able to work in a non-networked mode. In this mode, the database and GUI must run in the same VM and must perform no networking, must not use loopback networking, and must not involve the serialization of any objects when communicating between the GUI and database elements.
The operating mode is selected using the single command line argument that is permitted. Architecturally, this mode must use the database and GUI from the networked form, but must not use the network server code at all.
Especially the last section above indicates that the program should actually only be one (able to act as both server and client depending on the startup parameter) and not separated.
I would be truly greatful for some help and indications of how you guys have approached this issue.
Thanks, Bj�rn
/bj
Frans Janssen
Ranch Hand
Joined: Dec 29, 2004
Posts: 357
posted
0
In standalone mode it must be one; in networked mode you need two.
The trick most people apply is doing a structure like this:
UI Adapter Data server
Implement the Adapter in two classes, one which is just a simple pass-through and one which performs networking. You can then separate between UI and adapter for the networked mode. The UI and Data server classes need not "know" whether they are using standalone or networked mode.
Frans.
SCJP 1.4, SCJD
Andrew Monkhouse
author and jackaroo
Marshal Commander
There should only be one executable jar file in your submission. So from that perspective, there is only one single application.
However the command line parameter (or lack of command line parameter) sets the mode of the single application. It can be working in one (and only one) of server mode, networked client mode, or standalone client mode.
Originally posted by Andrew Monkhouse: There should only be one executable jar file in your submission. So from that perspective, there is only one single application.
Ehm, that is indeed a much clearer answer than mine. Apologies if my answer seemed to suggest that multiple applications had to be delivered.