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

Temporary reservation

 
Sergiy Kononenko
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

my URLyBird application must allow the user to book accomodations.
I provide the main frame of my GUI with a detailed dialog, which allows the user to check record data, to input customer ID and finally to confirm booking.
Do I have to reserve this record in the server so that nobody else can book it during this time?

Is my GUI design reasonable at all?

Thanks.
 
Roel De Nijs
Sheriff
Posts: 10662
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sergiy,

Welcome to the ranch!

in my assignment i can read the following


So because a room-booking will result in an update of the appropriate record, you have to lock the record before you can actually update it. and when you are done, you have to unlock that record too of course.

so your business logic would be something like:
 
Sergiy Kononenko
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Roel,

thank you.
This is what I do if the user confirms booking in my dialog.
But should I lock the record if the user just starts the dialog?
While the user obtains the ID of the customer (eventually contacting him over the telephone), he probably expects, that nobody books this record.
Do I need to safe the record against booking by other users during this time?

Best regards,
Sergiy
 
Sergiy Kononenko
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For better understanding, this is my booking dialog:
BookingDialog.JPG
[Thumbnail for BookingDialog.JPG]
 
Roberto Perillo
Bartender
Posts: 2271
3
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey, champ. Got your point. Well, this is not really necessary. What Roel explained above is when the user presses the "Book" button.
 
Roel De Nijs
Sheriff
Posts: 10662
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sergiy,

Let's say you lock the record when you open the dialog. user gets an email to book room x. he searches the record, dialog opens (and record is locked) and then he goes out for lunch, so record will be locked until he gets back. No other user can book that room. So that's not a good idea to do in my opinion. you have to make sure the locking time of a record is as small as possible.

Lock the record when user hits submit-button will do.
 
Roberto Perillo
Bartender
Posts: 2271
3
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you have to make sure the locking time of a record is as small as possible.


Agreed.
 
Roel De Nijs
Sheriff
Posts: 10662
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Roberto Perillo wrote:
you have to make sure the locking time of a record is as small as possible.


Agreed.


Great minds think alike
 
Roberto Perillo
Bartender
Posts: 2271
3
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Great minds think alike


Agreed!
 
Sergiy Kononenko
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Roel De Nijs wrote:Hi Sergiy,

Let's say you lock the record when you open the dialog. user gets an email to book room x. he searches the record, dialog opens (and record is locked) and then he goes out for lunch, so record will be locked until he gets back. No other user can book that room. So that's not a good idea to do in my opinion. you have to make sure the locking time of a record is as small as possible.

Lock the record when user hits submit-button will do.


Well, the server could automatically release locks when the specified time expires.
But you guys already answered my question: if you did not do it so and have passed, it must be really not required.
Thanks a lot!
 
Roel De Nijs
Sheriff
Posts: 10662
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sergiy Kononenko wrote:
But you guys already answered my question: if you did not do it so and have passed, it must be really not required.


Roberto passed, i have still some weeks to go before i can submit my assignment anf hopefully i will pass too
 
Sergiy Kononenko
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Roel De Nijs wrote:
Sergiy Kononenko wrote:
But you guys already answered my question: if you did not do it so and have passed, it must be really not required.


Roberto passed, i have still some weeks to go before i can submit my assignment anf hopefully i will pass too


Well then good luck!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic