It has finally become clear to me that you can’t get by solely with the MS AJAX Library for sophisticated DOM manipulation. The plumbing is impressive: classes, namespaces, interfaces, enums, etc. However, the Sys.UI.DomElement class doesn’t get you very far. Writing own code to traverse and manipulate DOM gets very boring very fast and is very unproductive.
The AJAX Control Toolkit Common Library
The toolkit relies on a top-notch library full of DOM manipulation goodness. You can find it in AjaxControlToolkit\Common\Common.js. However, it seems to have been written on the go, with functionality put in as needed by involved developers. I may be wrong in my assumption, but I don’t understand why many essential primitives found in other libraries of the same caliber (Prototype, JQuery, Mootools, etc) are missing. Also, common.js doesn’t appear to have been written to be used on its own, but with control extenders only.
Once it got tedious to plug holes of the mentioned libraries and write the same code over and over, I decided to look around for a comprehensive library. The usual suspects are Prototype, JQuery, Mootools, and Dojo. I bet you can list a handful more (suggestions?). My goal was to use the MS AJAX Library for plumbing and a toolkit for heavy DOM lifting.
Dojo was disqualified right away. I’m not touching anything ver < 1.0. Even though I used to like Prototype a lot, I dislike its object extension model. I actually like Microsoft’s approach much better.
Mootools is very solid but its DOM querying and traversing capabilities are not up to par with JQuery.
Which leaves JQuery by John Resig. JQuery lets you get away with some pretty insane syntax which surpasses other toolkits, AFAIK. I’ve been able to compress many, many lines of code into one-liners. Also, the community around JQuery has produced a bevy of plugins for all kinds of occasions. The one plugin I like in particular is Interface.
What do you, guys, use?