• 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

Thread model in configuration GUI

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Anyone?
 
Ranch Hand
Posts: 516
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Surfs up space ponies, I'm making gravy without this lumpy, tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic