Top "Observer-pattern" questions

A design pattern in which an object, called the subject, maintains a list of its dependents, called observers and notifies them automatically of any state changes, usually by calling one of their methods.

When should we use Observer and Observable?

An interviewer asked me: What is Observer and Observable and when should we use them? I wasn't aware of these …

java design-patterns observable observer-pattern observers
Delegation: EventEmitter or Observable in Angular

I am trying to implement something like a delegation pattern in Angular. When the user clicks on a nav-item, I …

angular observer-pattern observable eventemitter event-delegation
Super-simple example of C# observer/observable with delegates

I recently started digging into C# but I can't by my life figure out how delegates work when implementing the …

c# events delegates observer-pattern
Determine what attributes were changed in Rails after_save callback?

I'm setting up an after_save callback in my model observer to send a notification only if the model's published …

ruby-on-rails ruby-on-rails-4 model callback observer-pattern
How to trigger function on value change?

I realise this question has to do with event-handling and i've read about Python event-handler a dispatchers, so either it …

python event-handling observer-pattern
pass function in json and execute

Is there any way that I can pass a function as a json string (conversion with JSON.stringify), send it …

javascript jquery json observer-pattern
Implementing a callback in Python - passing a callable reference to the current function

I want to implement the Observable pattern in Python for a couple of workers, and came across this helpful snippet: …

python design-patterns functional-programming callback observer-pattern
How to create custom Listeners in java?

I want to know about how to set our own Listeners in java.For example I have a function that …

java interface listener observer-pattern
Observer Design Pattern vs "Listeners"

It seems to me that the Observer design pattern as described in GOF is really the same thing as Listeners …

design-patterns language-agnostic listener observer-pattern
C# delegate v.s. EventHandler

I want to send an alert message to any subscribers when a trap occurred. The code I created works fine …

c# delegates event-handling observer-pattern