Observer (Publish-Subscribe)
Observer
• For example, when an item in a list changes, the on-screen list should
change.
• You could just send a message from the domain object to the UI object
• This would violate Model-View separation
• Thus various controls register for events, either external (button presses, keystrokes) or internal (new item added to a list) and act accordingly.
GRASP Patterns