I am reading the Cocoa Fundamentals->Design Patterns->Observer->Uses and Limitations. It mentioned a “significant difference from delegation” that confuses me:
But objects receiving notifications can react only after the event has occurred. This is a significant difference from delegation. The delegate is given a chance to reject or modify the operation proposed by the delegating object. Observing objects, on the other hand, cannot directly affect an impending operation.
Especially on delegate is given a chance to reject or modify the operation, while observing objects can not.
Delegation means that the other object is called to perform a given task, so naturally it has a chance to influence the outcome of that task. It is like your friend asking you to buy 2 movie tickets for tonight – you have a say where to go, what movie to watch, may even suggest inviting more friends or go to a concert instead.
Notification happens only after the task has been performed, so the notified object can not change the event anymore. It is like your friend saying “I have 2 tickets for Avatar at 8pm tonight in Palace Cinema, would you like to come?”.