The observer pattern regulates communication between an object (called a subject) and other objects (observers) that want to react to changes in the subject. Instead of checking periodically for changes, observers register their interest with the subject and are notified about the changes with some callback or messaging mechanism.

If you subscribe to a magazine, you don't go to the publisher every day to check if a new edition is ready. Rather, you wait until the publisher sends you each issue.

This Gang of Four pattern is a basic part in distributed event handling systems. For example, a Model-View-Controller architectural pattern is always implemented with some application of the observer pattern.

The Live Binding mechanism that's ...

Get Hands-On Design Patterns with Delphi now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.