Friday, July 28, 2006

Javascript Helper Libraries

As I begin working on a new Javascript/AJAX web application, I've been poking around the web for helper libraries and best practices. Recently, a few interesting ones have come to light:


jQuery

jQuery came to me from, of all places, a games blog, but it looks to be pretty interesting. The fluffy premise is that "jQuery makes writing Javascript fun." It does this by "taking common, repetitive tasks, stripping out all the unnecessary markup, and leaving them short, smart, and understandable." jQuery provides helper classes that assist in manipulating the DOM, handling events, and performing AJAX work.

Prototype

Prototype is remarkably similar to jQuery, right down to the very heavy reliance on a $() function they define. Because of this, I doubt the two are compatible, and at this stage, I really have no idea what the relative strengths of each product is. Good documentation for Prototype (there is none at the download site) can be found here.

Scriptaculous

One thing Prototype has going for it is the fact that the very well-done Scriptaculous Javascript effects library is built upon it. Scriptaculous provides helper routines to do cool DOM tricks like sliding panels, fades-ins and fade-outs, and non-fluffy visual effects like letting users rearrange lists by dragging <div>'s around.

No comments: