Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Server side GUI

 
christy smile
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, All,
I have provided a server side GUI. Then, I read somewhere in the forum that a Help might be needed for the Server GUI as well. So, I am thinking about adding a menubar to it. I did not use MVC for the GUI before since it is so simple. Now, the server GUI is getting more and more complicated, should I utilize the MVC for server GUI as well? Comments welcome!!!
P.s. I think my project is getting bigger and bigger Not sure when to stop anymore...
 
BJ Grau
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Simplify things and get rid of the server GUI. It won't earn you any more points, and it gives you more chances to make mistakes which can cause you to lose points.
 
Michael Morris
Ranch Hand
Posts: 3451
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi christy,
If you decide to keep the server GUI, just keep it simple. My server GUI was just one big monolithic class (not great design but sometimes reusablity is not an issue), no MVC, no nothin'.
Michael Morris
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My server gui was only a total of 90 lines with blank lines, and the code in the Server that starts it is very small too.
even though it is not in the requirements I highly recommend this approach.
It makes stopping the server as simple as clicking on a button.
Mark
 
christy smile
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, Michael,
I have a big long file that have everything in there for the Server GUI as well. After reading your message about providing help on the server by a click of button, I changed mine to have a menu called HelpTopics for that purpose. Then, I decided that the "STOP" button on the GUI should not exit the program, but just to stop the current server activities (just unbinding the RMI registry, is this enough?). Therefore, I created another menu "QUIT" to exit the whole server application. Other things on the GUI include the "START", "STOP", "RESET","BROWSE.." (for database) buttons. Three labors and three text field for "Hostname", "portNumber" and "database". Is this too much?
Mark, my server GUI has a total of 478 line so far, not even including the code that starts the on-line help, which is a separate file shared by the client. Your 90 lines really make me worry about the server GUI. I think my design is a bit complicated, but all the things I have on there seemed to be neccessary.
Comments are SUPER welcomed
Thank you!
Christy
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK my 90 lines in the ServerGui class consists of
two menus file and help, each with one menuitem, exit and help.
I then have one button to stop the server in the center of the borderlayout, and a Jtextfield in the South to be my status line.
I then have 5 other methods that are a 3 lines each, one for the method signature, one for the } at the end, and one line of actual code.
Three of the methods are hook methods to hook ActionListeners to. The 4th is a setter to update the status line, and the 5th is to show a JOptionPane if there was an error.
That is all my code in the ServerGui class.
In my Server code there are 40 lines that handle the actions of the GUI and also shutdown the server if the button is clicked.
For showing the Help, I have a Documentation class. I use this class for showing the html for the server gui and the client gui.
That is 68 lines with all the imports, instance variable declarations whitespace, and } on their own lines.
Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic