ddd-by-examples / library

A comprehensive Domain-Driven Design example with problem space strategic analysis and various tactical patterns.
MIT License
4.92k stars 726 forks source link

Book that is currently not available - alternative #30

Closed ccristian closed 5 years ago

ccristian commented 5 years ago

"When a patron tires to place on hold a book that is currently not available it should not be possible, thus resulting in book hold failed event, as it is depicted below"

The book view should not let the patrol to hold only available books ? (grey out the others etc)

In this way will be impossible to to hold a book that is not available ....

pilloPl commented 5 years ago

Yes, but also that means that we would have to pessimimisticaly lock everything degrading scalability

If you are looking at the rendered view of available books you are doing it for a moment. In this moment someone else could have gotten the book.