Observation is a popular programming strategy that lets you derive the current state of your application from the events you're listening to. Instead of polling for new information, your program will listen to events or notifications in order to update its state.
This strategy is particularly suitable for decoupling event sources from their consumption part. However, always keep in mind that your program can suffer from significant performance hits if you're processing all events without throttling, debouncing, or similar.
Let's get started with NotificationCenter, provided by the Foundation framework.