Abstract
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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
We do have dedicated historical debugging tools such as Microsoft Visual Studio’s IntelliTrace or UndoDB.
- 2.
You can design your code in a Command-first fashion; that is, ensure that commands are the only publicly accessible API that your objects provide.
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2019 Dmitri Nesteruk
About this chapter
Cite this chapter
Nesteruk, D. (2019). Command. In: Design Patterns in .NET. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-4366-4_15
Download citation
DOI: https://doi.org/10.1007/978-1-4842-4366-4_15
Published:
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4842-4365-7
Online ISBN: 978-1-4842-4366-4
eBook Packages: Professional and Applied ComputingApress Access BooksProfessional and Applied Computing (R0)