Win a copy of AWS Security this week in the Cloud/Virtualization forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Do I need to wait in UI ?

 
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,
I was wondering do we need to show the progress bar in are UI as booking or search is going on. Becoz potentialy it is possible for our booking to go on for some good time (like rec is locked lock..).
and if you need one, then do we need to have facility to cancel the transaction in the middle?
please help me taking this decision
Thanks
amit
 
Ranch Hand
Posts: 240
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Its good that you thought of it. Lets look at the possibilities:
1. Show a progress bar as you mentioned along with cancellation and so on. A lot more work, dont beleive that much detail is required. It'd be neat though, just make sure, that as an when u cancel, u dont leave the connections in an inaccurate state.
2. Show a busy wait cursor as long as booking is going on....dont care if it takes 1min or 60 mins. My design states that cancellation is not required as of the requirements. When the job completes or bombs, make sure u reset the cursor back. When will the booking process seem slow? If our locking is not good enough to release locks correctly or across a network that is dead slow. How much work are we doing for booking? Are we sending a very large object across the wire? Currently no...thus the time to transfer the data across a standard connection like 28.8 would be fast too with the current scope of the DataInfo object used. Now if the database got really big, then the read records remote call of all records would take a hell of a long time, right. In which case we would need some sort of a paging client etcc......heheh Looks like I am defending my solution here..
Either way dude, make sure you document your approach any why u feel one way is better than the next etc.... Hope I didnt confuse u more ...
Good luck...
3.
 
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Amith - Certainly GUI standards require that users should not be kept guessing. Accroging to me your solution is really close to be the best, you may want to add text also, and keep udating the user with textual messages so he is further sure that system is working (in other words, system is not hanging !!!). Should be really careful while dealing with cancelling the threaded transaction (as this requires that you have a seperate thread processing the transaction because AWT Thread needs to be listening for user input). But, for any future real-world projects, you have the answer !!!.
Showing the hour glass is a quicker/simple one, though not the best, but should be enough for this assignment. Also, as kalichar rightly states, this one is not very time-taking , so you might as well settle for an hour glass.
-Rajesh
 
Kalichar Rangantittu
Ranch Hand
Posts: 240
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agree with Rajesh...progress bar should be the way out in a real application. Now you need to deal with a case where things are going to happen real fast in the client when running in a local mode. In that case, before anyone can even see the status bar doing its thing, its going to book the seats. So think about it..
 
amit ahuja
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Kalichar and Rajesh,
I agree with you guys. But Still i have small doubt.. did u guys use swing worker thread for booking or searching ?
I guess we need to talk to server on a seperate thread to show an hour glass too (not worked much in swings..)
Am i right?
amit
 
Rajesh Matti
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, You do not need a seperate thread for hour glass. But you need 2 threads if you want to listen to possbile 2 events, one a return from the server, another one to respond to user's button clicks.
 
You showed up just in time for the waffles! And this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic