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
  • DownloadDownload
  • PrintPrint

Events

As we have already mentioned, plugins use the Observer pattern to keep an eye on events and handle them. The Observer pattern is a design pattern in a logical function, which is common to programming. This particular pattern allows listeners to attach to a subject. The subject can initiate a notification (essentially an event), which will cause the listeners to react to the event.

The expressions ‘listener’ and ‘observer’ are interchangeable, as are ‘subject’ and ‘observable’.


  

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