[Cs3] Push/Pull

Mikhail Nesterenko mikhail at cs.kent.edu
Tue May 3 22:52:08 EDT 2022


> Dr.Nesterenko since the example that you gave isn't fully covered in the
> slides will you be willing to give a more detailed explanation please? for
> both push and pull.

It is covered in Observer lectures slides 5 through 7. And the slide
information is taken from the "Design Patterns" textbook. I think you
guys have sufficient information to prepare for the exam.

thanks,
--
Mikhail

> 
> On Tue, May 3, 2022 at 8:59 PM Mikhail Nesterenko <mikhail at cs.kent.edu>
> wrote:
> 
> >
> > >
> > > 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