May 2019
Intermediate to advanced
356 pages
5h 18m
English
Think about a trivial variable assignment, such as meaningOfLife = 42. The variable got assigned, but there’s no record anywhere that the assignment took place. Nobody can give us the previous value. We cannot take the fact of assignment and serialize it somewhere. This is problematic, because without a record of the change, we are unable to roll back to previous values, perform audits, or do history-based debugging.1
The Command design pattern proposes that, instead of working with objects directly by manipulating them through their APIs, we send them commands, or instructions ...