Skip to main content

Observer

  • Chapter
  • First Online:
Design Patterns in .NET
  • 1621 Accesses

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 34.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 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

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2019 Dmitri Nesteruk

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

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

Publish with us

Policies and ethics