aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Please comment my design Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Please comment my design" Watch "Please comment my design" New topic
Author

Please comment my design

Mihai Radulescu
Ranch Hand

Joined: Sep 18, 2003
Posts: 916

Hi,

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 ]

SCJP, SCJD, SCWCD, OCPJBCD
Aruneesh Salhotra
Ranch Hand

Joined: May 12, 2004
Posts: 167
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.
Mihai Radulescu
Ranch Hand

Joined: Sep 18, 2003
Posts: 916

Hi Aruneesh,


why dont u have a simple GUI for network server ?


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 ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Please comment my design