Event based HTML applications made easy

03.08.11

Filed Under: JavaScript

Having spent a few years making Flex applications it was a bit of a shift to return to making HTML/CSS/JavaScript based applications. One of the things I really missed was the ability to create loosely coupled componenten using custom events.
You do have the option of using jQuery Custom Events, but without depending on a library there is no option of creating custom events in JavaScript. Custom events in jQuery have a slight performance hit and therefor it made sense to create a dead simple Publish Subscribe pattern implementation in JS.

Here are the requirements:

  1. Light weight
  2. No dependencies
  3. Simple to use API
  4. Test cases for all features

Grab the source on GitHub on let me know what you think.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Subscribe to comments feed (this is global, not just for this entry)

Fork me on GitHub