wood burning stoves 2.0*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes GUI design. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "GUI design." Watch "GUI design." New topic
Author

GUI design.

Panku Panchal
Ranch Hand

Joined: Apr 24, 2003
Posts: 33
Hi,
I'm working on my GUI..have not thought about MVC pattern yet. I understand MVC pattern but when it comes for division of methods I get confused. So those questions come next.
First, I was wondering how should I prompt user for Local Mode or Network Mode. What should be on welcome page? Will those be Radio buttons for local or network and then I show up Search panel filling combo boxes from local db.db or there is any other way to do it?
Again if user selects for Local mode then shall I allow him/her to change mode again?
Please do comment on this.
I'm not able to have clear picture of my GUI.
Panku
S. Ganapathy
Ranch Hand

Joined: Mar 26, 2003
Posts: 194
Hi Panku,
Please do not provide more functionality in the GUI. Others will get less marks, if you provide more functionality, and and your code will become bench mark for others. Just kidding. Please do not mind.
Comming to the actual scene, I am providing a dialog when UI starts, which collects database location(local/remote), and it is a requirement in my assignment. If user enters //localhost, it runs on local mode, else, if the user enters machine name like //ganapathy, UI connects to the server running in //ganapathy via RMI. Here database location refers to the location of the server.
The above is, if the user runs the UI in networked mode. If the user runs the UI in local mode, dialog does not comeup, directly, it will run on local mode.
I am not providing functionality to change from local mode, and remote mode. I am not providing any welcome page, as there is no authorization at the database side, or UI side.
If you are so curious to provide some hint to the user, that UI is running on local mode, or remote mode, use the frame title. If you are connecting in local mode, display XXX Client - Local in local mode, and XXX Client - ServerName is remote mode, saying to which server, this UI is connected.
In my case, if the server is running on different machine, it takes the machine's IP address, and the client to lookup the server, client uses the IP address to lookup, and binding name is some unique name like "Ganapathy", other's may not use, or take some unique name from Sylvan Prometric, like "Andrew MonkHouse". He told once, it took unique binding name.
Regards,
Ganapathy.
Panku Panchal
Ranch Hand

Joined: Apr 24, 2003
Posts: 33
Hi Ganapathy,
I really appreciate your reply.
Please clarify few things for me.
As you said:
Comming to the actual scene, I am providing a dialog when UI starts, which collects database location(local/remote), and it is a requirement in my assignment. If user enters //localhost, it runs on local mode, else, if the user enters machine name like //ganapathy, UI connects to the server running in //ganapathy via RMI. Here database location refers to the location of the server.
The above is, if the user runs the UI in networked mode. If the user runs the UI in local mode, dialog does not comeup, directly, it will run on local mode.

Does that mean you are checking yourself if user logged in a local mode ( i.e. by checking if RMI is running ) and if RMI is running then asking him hostname popping dialgue box?
I am not providing functionality to change from local mode, and remote mode. I am not providing any welcome page, as there is no authorization at the database side, or UI side.

Even I don't like to provide it.
Do comment on above.
Panku
S. Ganapathy
Ranch Hand

Joined: Mar 26, 2003
Posts: 194
Hi Panku,
I was on week end, I could not give reply soon.
Comming to point, I am doing new assignment(Contractors). In that, there is only one jar file, to run server, and client. Command is:
java -jar runme.jar <mode>
mode is one of:
server - server runs
alone - runs in standalone mode (GUI client in non network mode)
- left as : java - jar runme.jar
means GUI and network client must run.
So, when the argument alone is there, I am poping up the dialog to collect the database location(server location). This has meaning in network mode. I am providing default location as //localhost. If user enters server location say //ganapathy, client finds the server location, if not found, display exception message, and keeps the same dialog to collect server location, else, load the main window.
In case of stand alone mode, I am not providing dialog, which is not necessary.
I am controlling the dialog with a boolean flag networkMode;
and this mode, I am passing to main window. Dialog has parent(main window). If flag is true, create, show dialog, else do not create dialog.
I really don't know your requirements. In case of client, I think, you are providing some command line arguments, I feel. So you too can control in similar way.
Please let me know if my views are useful. And do provide some criticisms too if am not right, so that I too will have an opportunity to learn.
Hope you are watching the discussion in thread you already started .(ConnectionFactoryImpl contains instance of Data or RemoteDataObject?)
Thanks n Regards,
Ganapathy
[ June 08, 2003: Message edited by: S. Ganapathy ]
Panku Panchal
Ranch Hand

Joined: Apr 24, 2003
Posts: 33
Hi Ganapathy,
Sorry for late reply...
I've fever since few days so I've yet not read your post...I'll read and comment on it as soon as I feel good.
Thank You.
Bye
Panku
 
 
subject: GUI design.
 
Similar Threads
NX: A confusion about specifying the location of the database file
commandline argument
The mode flag
Should I make local/remote selection screen?
Pass scjd