• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Thread model in configuration GUI

 
Richard Levy
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I've decided with my assignment that the configuration will be presented on startup. This is consistent for all modes and a simple approach.

In my main GUI (after config) I will obviously adopt the appropriate threading model for handling Swing & work operations. However, for the configuration, which is pretty small (3 fields max!) I've decided that I can do everything in the Swing thread. This is for a number of reasons. 1) I beleive its overkill to do things like simple form validation in another thread. 2) The application hasnt actually started at this point so there is nothing else going on. 3) The dialog box approach I'm using is modal anyway.

These decisions will go in my notes, but do you think I'm cutting a corner and should just bite the bullet and do a "proper" implementation.

Thanks
Rich
 
Richard Levy
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anyone?
 
Alex Belisle Turcot
Ranch Hand
Posts: 516
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Richard Levy:
[QB]Hi,

I've decided with my assignment that the configuration will be presented on startup. This is consistent for all modes and a simple approach.


By configuration, do you mean IP/Port & database file? That's exactly what I did, the user could not go through without entering/choosing a valid IP/Port & database.


I've decided that I can do everything in the Swing thread. This is for a number of reasons. 1) I beleive its overkill to do things like simple form validation in another thread. 2) The application hasnt actually started at this point so there is nothing else going on. 3) The dialog box approach I'm using is modal anyway.

It did not occured to me to start another thread from the SWING thread (I sincerely did not think about that, I'll check this out for myself).
Do you really think it is necessary to do so ? Unless your operation is heavy, I wouldn't think the user would see a difference (for this assignment)...
When the user pressed a button, my listener would validate (or delegate) and decide how to react. I did not used an additional thread for that..

Eventually, my SWING thread would end up calling an RMI operation (from the listener through the Controller to the server)..


These decisions will go in my notes, but do you think I'm cutting a corner and should just bite the bullet and do a "proper" implementation.


In doubt, do document it even though it seems very low level decisions.
From your post, it does not seem to me like your avoiding anything from the assignment.

Regards,
Alex
[ March 20, 2008: Message edited by: Alex Belisle Turcot ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic