Choosing jQuery

When I recently got to choose a javascript library for our team of designers and front-end developers to standardize on, learn and use, I skipped over other libraries I had some experience with and went with one I'd never used before: jQuery. Here's why:

  • It's small but complete. Simple effects, utility functions, AJAX, CSS 3 selectors, elaborate DOM manipulation -- it's all there in a 14k (minified and gzipped) file. Even better, the jQuery folks seem to be pretty committed to having one of the most compact libraries out there, so I feel safe that future versions aren't going to bloat terribly.
  • jQuery meets the needs of designers without shortchanging developers. Basic jQuery is dead-simple to read and write, even for people with few or no development skills. Understanding CSS selectors and knowing a handful of jQuery methods will get you a very long way before you have to learn anything that seems like programming. For developers, there's the constant surprise at what you can accomplish in a line or two, and how thoroughly complicated tasks have been abstracted.
  • The documentation is thorough, clean and professional. Other libraries are particularly abysmal in this regard, and knowing that I could find the answers to questions quickly was key to choosing jQuery -- I'd heard great things about the library, but if I and other had to spend a lot of time searching for answers, that wasn't going to work.
  • jQuery works exactly like you think it will. In an hour, you'll have the hang of it. In a week, you'll wonder why you ever considered another library. Once you understand the fundamentals, if you find yourself thinking that a method should exist, you'll find it probably does. You can probably guess what it's called, too. Method overloading means there are fewer method names to recall, and the arguments the methods take follow just a handful of patterns -- which means that if you understand how one method works, you understand dozens.
  • The community is active, and the developer is too. John Resig, the developer of jQuery, is a frequent participant on the project's user mailing list, and I've come across several plugins where he has worked with the plugin author to make the plugin -- or sometimes jQuery -- better. Speaking of plugins, there are plenty, for most anything you might need -- and they're easy to write, too.
  • Now there's a UI. I haven't used it yet, but it's supposed to be completely skinnable and offer all sorts of UI widgets. In particular, I expect I'll make use of the date selection widget very soon.

Loading mentions Retweet

1 comment

Dec 06, 2007
Spreading jQuery | rdmey said...
[...] I lobbied to work on implementing it. I'd worked with Prototype and script.aculo.us before, but I chose jQuery for this project, for a bunch of reasons I explained in a previous post. While I'd certainly do a [...]

Leave a comment...