Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
About the cons of the push model of the observer pattern
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post will appear after it is approved by moderators
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
nguillot  
View profile  
 More options Dec 1 2008, 8:19 am
From: nguillot <nicolas.guil...@gmail.com>
Date: Mon, 1 Dec 2008 05:19:27 -0800 (PST)
Local: Mon, Dec 1 2008 8:19 am
Subject: About the cons of the push model of the observer pattern
Hello.

On a project we implemented the observer pattern with the push model
approach: the interface of a observer provide several notifications
functions, emitted by a subject.

Generally we can read that the push model gives less reusable
observers, and the subject makes assomptions about observers that can
not be always true.

My questions is about the differences about that cons in the 2 models:
push / pull.

For me, a subject should notify its observers each time a functional
event occurs. In the pull model, if we have forgotten a functional
specification of the subject, an observer which would need to react to
this event could not because the subject has no state for that.
In both model we need to implement some new things: in the pull model:
the subject should provide new informations for its observers, in the
pull model, we would add a new functional notification in the observer
interface.
But I think in those 2 cases, the coupling between subject and
observers is the same: I don't see why the subject would make more
assumptions about its observers in the push model; or why the observer
would be less reusable.

Maybe a concrete example of subject observer would help to illustrate
this thread: I could add one if some people are interested about this
topic.

thanks

Nicolas.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2010 Google