JavaScript Observer Class

Novembro 9, 2006

First off, let me be the 763rd person to say that JavaScript does not have have a formal class system, however it does have the expressive nature to represent the notion of a class. That being out of the way, this entry is about representing the Observer Pattern in JavaScript; otherwise known as the publisher/subscriber model. As some already might know, it is already well demonstrated in modern event handling BOM’s such as IE’s attachEvent or W3’s addEventListener which allow you to register multiple listeners, and notify each callback by firing one event.

Link

[Via Dustin Diaz]

Entry Filed under: +geek, javascript. .

Leave a Comment

Required

Required, hidden

Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Trackback this post  |  Subscribe to the comments via RSS Feed


Novo domínio

Por favor atualize seu favorito para: ref.amfdesigner.com,
e seu Feed RSS para: feeds.feedburner.com/amfref.

New domain

Please update your bookmark to: ref.amfdesigner.com,
and your RSS Feed to: feeds.feedburner.com/amfref.

RSS amf | ref