What is the difference of delegator and dispatcher?
I am not quite sure of either concept.
|
What is the difference of delegator and dispatcher? I am not quite sure of either concept. |
||||
|
|
|
Delegation is assigning a responsibility to some other object. For example, if I am invited to a meeting and I assign it to a junior colleague, I am delegating. The point to note here is that it is the junior colleague who will attend the meeting and there is no intermediary between him and me. Dispatching is not delegating. Dispatcher is more like an intermediary who relays a request to someone else. For example, to attend the meeting my astute junior colleague may ask a cab company for a pick up and the guy receiving the request may dispatch it to a nearby cab driver. The point here is that dispatcher is only passing along the request. |
|||
|
|
|
Dispatcher
Delegate
Consider this:
In short: |
|||
|
|