Event-Driven Programming

Context: frontend-dev-bookmarks / Architecture


  • Comparison Between Different Observer Pattern Implementations: The comparison below is just about the basic features of subscribing to an event type, dispatching and removing an event listener.
  • Event Emitter, Pub Sub or Deferred Promises: In this post Pete Otaqui explores a little about how each pattern works with (very) basic implementations and looks at the reasons why you might choose one over another.
  • Implementations: Libraries, frameworks and tools that use Event-Driven Programming paradigm.
    • Bacon.js: A small functional reactive programming lib for JavaScript. Turns your event spaghetti into clean and declarative feng shui bacon, by switching from imperative to functional.
    • Flight: An event-driven web framework, from Twitter.
    • Mediator.js: Mediator is a simple class that allows you to register, unregister, and call subscriber methods to help event-based, asyncronous programming.
    • Postal.js: Postal.js takes the familiar "eventing-style" paradigm and extends it by providing "broker" and subscriber implementations
    • Radio.js: Radio.js is a small dependency-free publish/subscribe JavaScript library. Use it to implement the observer pattern in your code to help decouple your application architecture for greater maintainability.
    • js-signals: Custom Event/Messaging system for JavaScript.
    • pubsub.js: A tiny (~600 bytes when minified, ~300 bytes when gzip'd) and robust pubsub implementation.


开源资源分享群:680761714      PHP开源学习群:656323847