Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 3: Core Rx

C H A P T E R 3

Core Rx

As noted in previous chapters, Reactive Extensions (Rx) is an extension of LINQ. The key, distinguishing feature of Rx is that rather than being based on IEnumerable, Rx is based on IObservable—that is, the interface for iterating over an observable collection. This, in turn is based on the Observer design pattern as described in Design Patterns.1

The essence of the Observer pattern is that the observable object (sometimes called the subject) has actions or properties of interest to one or more observers. When the observable changes in a way that might be of interest to the observers, it notifies them (typically by raising an event).

The nomenclature can be confusing because the Observer pattern is a subset of the Publish and Subscribe pattern, in which a publisher makes information about its state available to one or more subscribers. What truly confounds things is that in Rx, observable collections have subscribers —that is, the objects that observe the observable collection are said to subscribe to the collection.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint