How to stop a User from clicking submit button(An interview question)
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Shaun_Tait
Posted On:   Wednesday, May 28, 2008 07:53 AM

Think of a scenario where , if a Gas agency customer wants to update his address on to taht company's database . so he reaches their office and for doing that job there are five persons , so he asks the first person to update his data on to their database , the first person after changing some fields on the screen (without clicking submit) goes away . The customer gets his work done with the help of the second person Now how do i stop the first person from clicking the submit button OR stopping from overriding the data Please note taht there is no concept of session timeouts for this application    More>>

Think of a scenario where , if a Gas agency customer wants to update his address on to taht company's database .


so he reaches their office and for doing that job there are five persons , so he asks the first person to update his data on to their database , the first person after changing some fields on the screen (without clicking submit) goes away .




The customer gets his work done with the help of the second person




Now how do i stop the first person from clicking the submit button OR stopping from overriding the data



Please note taht there is no concept of session timeouts for this application    <<Less

Re: How to stop a User from clicking submit button(An interview question)

Posted By:   Robert_Lybarger  
Posted On:   Thursday, May 29, 2008 06:30 PM

This is a standard configuration management system (CMS) issue. The app in question needs to be designed, ahead of time, with some concept of a "lock" on the user's information. When worker #1 accesses the info in an "edit" mode, they effectively lock that record (which probably means a flag in the database for that user). When the second worker tries to access it for editing, they are denied, preventing an overlapping change. Now if the first user takes too long, the system needs some way to decide they no longer have a lock. This might be a simple timer (get your work done in five minutes or start over) and/or might involve the ability to steal or reassign the lock to another person (with appropriate notice to worker #1 their lock has expired or been taken, denying them the ability to save information. The exact implementation details are left as an exercise to the system architects. (You might also look into how some software version control systems work, since it's the same sort of idea.)
About | Sitemap | Contact