Abstract
The Observer pattern, quite simply, lets one component notify other components that something has happened. The pattern is used all over the place; for example, when binding data to the UI, we can program domain objects such that, when they change, they generate notifications that the UI can subscribe to and update the visuals.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
By the way, System.EventArgs is an empty type. All it has is a default constructor (empty) and a static member EventArgs.Empty that is a Singleton Null Object (double pattern headshot!) that indicates the event arguments have no data.
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2019 Dmitri Nesteruk
About this chapter
Cite this chapter
Nesteruk, D. (2019). Observer. In: Design Patterns in .NET. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-4366-4_21
Download citation
DOI: https://doi.org/10.1007/978-1-4842-4366-4_21
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)