Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

B&S: booking a contractor.

 
Javier Corral
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a doubt about booking a contractor.

I thought that when a contractor is locked I must change the owner field of the corresponding record,
and when the contractor is unlocked I must change the owner field to all blanks.

The problem is that I thought that the owner field represents the cookie that identifies the client locking the record. But the assignment says that my application does not interact with these numbers, rather it simply records them.

Also, my assignment says that the size field is the number of workers "available when this record is booked". �does it mean that the size value must decrease every time a contractor is booked?.

I'm confused with this.
Thanks for advanced.
 
Mark Ebeling
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Javier,
The locking and booking operations are seperate. The locking mechanism uses a cookie that you need to create upon a lock, and needs to be returned by the client upon unlock.

The booking of a contractor just assigns the Customer ID to the record. The client will provide the contractor ID. There is no unbooking logic required within my assignment (B&S 2.2.2). Some people have decided to provide it and some not. That is up to you.

I have also not provided any decrementing logic to for the number of contractor workers since any business logic we were to create may be incorrect( who knows how many workers are needed for a job). So I just book the entire record.

Hopefully that helps.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic