• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Is it a bad design to use a single conf dialog for all modes?

 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm using the same Dialog (actually JFrame) for getting the configurations
for all modes: stand-alone mode, network-client mode, and server mode.

For each mode, I hide some fields (the unused fields) and show others.

For example:
-In the stand-alone mode, I show the "file-location" field, and hide
the "port" field and the "server IP" field.
- In the server mode, I show the "file-location" field and the "port"
field, and hide the "server IP" field.

Is this a bad design?

Would it be better to implement two dialogs, one for the client modes, and
one for the server mode, so that changes for one side will not affect the
other?
 
Ranch Hand
Posts: 145
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In my gui design, I have a common gui abstract class, which defines many common facilities for the subclasses. for example client gui extends this common gui and do the presentation specific for the client. Among the child classes, there are local dialog and rmi dialog, while the JFrame itself and other fields are defined in the common gui. I think this follows spirits of OOD, if not good enough. For the user inputs of either rmi, local, or server, I only need two fields: host, and port in the common gui.

Just read more about your posting. I think the client, server dialogs by themselves are different objects, so they deserve their own entity (class). That is I have local and rmi dialog. However, for the server with limited functionalities, I combined its dialog with its main window.
[ December 19, 2004: Message edited by: Andy Zhu ]
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic