[Cs3] Push/Pull
Mikhail Nesterenko
mikhail at cs.kent.edu
Tue May 3 20:59:41 EDT 2022
>
> One more thing related to this. There is only one example like the push
> method of strategy, but none for the pull, and the same kind of thing for
> the mediator, and observer as well. On the final will we have to implement
> these patterns methods that we don't have an example of?
Well, push method is simpler to implement. For example, in the
Observer Design Pattern, there is only one pointer from the subject to
observers. When the subject sends the state change notification
message, the state update is included in the message itself.
In case of pull, the concrete observer has a pointer back to the
(concrete) subject so that when the subject sends the message, the
message does not have any state information. Instead, the
observer uses the reverse link back to
So the examples that we studies are for the more complex pull method.
Thanks,
--
Mikhail
More information about the cs3
mailing list