This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
Please comment my design, for the configuration UI.
Because the application runs in three different modes I decide to use three different UIs - for all this UI I use the MVC pattern (together with the strategy pattern). My Model encapsulates a java.util.Properties and provides access methods to it. The View has two parts : a dialog and a display page. The dialog encapsulates a Display page and provides a common set of common actions that can be done with the Display Page. The Display page is used to render related information, I have three of them : a server, client and an alone display page. The Controller transports the request from the view to the model, the model announce the view every time when its state is changed.
In a very simplistic way I have :
This look like a classic MVC case to me. I hope is not to complicated. Comments are welcomed.
Regards, Mihai [ February 23, 2006: Message edited by: Mihai Radulescu ]
Every other day, I am changing my design, to include OO stuff and cleaning up stuff. Your design seems good enough. Till the time, there is a OO involved, the design is good. Also MVC is good implementation for our examples, so your model does fit into the same.
Question, why dont u have a simple GUI for network server. It is only changing RMI port or DB file. Anything else, you are trying to achieve.
That was my first design - like you I exeperiment a lot of designs - in the actual design I decide to let the user more fredom. My configuration workframe allow changes for : *server address *server port *database file *database id - know like the magic cookie *database encoding *valid record falg *delete record falg
In this way the application (server) can handle a various number of related database files. Lets say that we have a database with the same record arithmetic but with different flag for deleted and valid records. Also the database id can be changed - lets say that in the future we decide ot have a new id for the same database. I can not assume that I will be the only user /generator for the database file. All of this configuration can be save under different names(properties files) and reloaded when they are needed. I also have a set of default settings.
How you handle this issue ?
Regards, Mihai. [ February 24, 2006: Message edited by: Mihai Radulescu ]