Library/Patterns/Notification

Quite often in computer programs, there is one piece of code that wants or needs to respond to changes made in another part of code. There needs to be some notification mechanism between the code making the change and the code responding to the change.

Change notification can be handled in numerous ways:
 * Explicit notification: component A calls component B specifically describing the change
 * Explicit notification of an intermediary 'event': component A sends generic notification of the change to a central component, component B can attach a 'listener' to that event
 * Implicit notification of an intermediary: when component A changes the value, the value data type itself sends notification via the prior mechanism
 * Always refresh: every time component B needs the value, it reads the current value
 * Periodic checks: component B stores the previous value and intermittently checks the current value for changes
 * Manual refresh: the user must explicitly 'refresh' the component to pull in any new changes