Latest: buggy behaviour of parent:: in PHP 5.3.3

Content with Style

Web Technique

Reglib, an Event Delegation based Framework

by Pascal Opitz on November 14 2008, 22:50

Via the ajaxian I came across the javascript based framework reglib, written by Gregory Reimer. It is based on some very clever thoughts and makes heavy use of Event Delegation.

Event Delegation is a technique I used quite a lot at Tesco. Back then Matt Dunn, who was the lead UI developer there, introduced me to its benefits and how it helps to keep the memory footprint down.

reglib goes a step further. It utilizes the body element as single entry point for all events, and identifies the nodes that triggered the event so it can match them with  functions that were assigned through the library and execute them.

This cuts out the wait for until the DOM is Loaded by the browser, something that is pretty much essential and implemented into most other frameworks like JQuery or MooTools. Gregory Reimer, who has written reglib based on his work for sun.com, seems to dislike this and even describes this as anti-pattern.

Comments

Leave your comment

Comments are moderated.
Tags allowed: a, strong, em, code, ul, ol, li, q, blockquote, br, p

Advertisement
Advertisement