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.

How to combine two live data one after the other?

I have next use case: User comes to registration form, enters name, email and password and clicks on register button. …

android observer-pattern android-room android-architecture-components android-livedata
C#: events or an observer interface? Pros/cons?

I've got the following (simplified): interface IFindFilesObserver { void OnFoundFile(FileInfo fileInfo); void OnFoundDirectory(DirectoryInfo directoryInfo); } class FindFiles { IFindFilesObserver _observer; // ... } ...and …

c# events observer-pattern
Rails 3: How to identify after_commit action in observers? (create/update/destroy)

I have an observer and I register an after_commit callback. How can I tell whether it was fired after …

ruby-on-rails ruby-on-rails-3 transactions observer-pattern
C++11 observer pattern (signals, slots, events, change broadcaster/listener, or whatever you want to call it)

With the changes made in C++11 (such as the inclusion of std::bind), is there a recommended way to implement …

c++ boost c++11 signals observer-pattern
MediatorLiveData or switchMap transformation with multiple parameters

I am using Transformations.switchMap in my ViewModel so my LiveData collection, observed in my fragment, reacts on changes of …

android observer-pattern android-architecture-components android-livedata android-viewmodel
Rxjs Subject next() after complete()

I have service which connects with Subject() to do paging. I'm using next(newData) to pass to subject, which keeps …

javascript rxjs observable observer-pattern rxjs5
C# Plugin Architecture with interfaces share between plugins

I divided my problem into a short and a long version for the people with little time at hand. Short …

c# plugins interface observer-pattern
Pros and Cons of Listeners as WeakReferences

What are the pros and cons of keeping listeners as WeakReferences. The big 'Pro' of course is that: Adding a …

java design-patterns observer-pattern weak-references
When should I remove observers? Error about deallocating objects before removing observers

I am trying to use key-value observing in one of my classes. I register the observers in the init method …

objective-c cocoa-bindings observer-pattern key-value-observing
Rails 3 Observer -- looking to learn how to implement an Observer for multiple models

I'd like to add an Auditor Observer which does an action anytime after_create for 3 models (books, characters, authors)... I …

ruby-on-rails ruby-on-rails-3 observer-pattern