Archive for January, 2009

Why is jQuery so Awesome?

Thursday, January 1st, 2009

I find myself asking this question a lot.  How has this little Javascript library named jQuery managed to so significantly improve the quality of my life?

I find that one of the most complicated aspects of building web applications is the “front-end.”  I define this to include the code that the browser runs - the HTML/CSS and Javascript - as well as the “top layer” of the server-side code that deals with control and view rendering.  In order to build a relatively compelling user experience in a web product these days, you need to use a lot of Javascript. Javascript is a necessity for creating rich dynamic user experiences in web apps, using the popular practices of DHTML and AJAX.  This is great, but it can also require a lot of development time and add a good deal of technical debt if you want to create a lot of slick features.

Every time we’d consider adding a slick UI feature that requires Javascript, we’d have ask ourselves if we have the time to do this, and if we’d be willing to risk all the potential browser compatibility issues.   Well, that is until jQuery came along…

Now, every time we want to add another slick feature, we ask jQuery and typically get an answer we like. And, when we go to test in IE, it almost always just works. Wow. So, just to sum up this ode to jQuery, here are a few of the thing that make it awesome and why you should use it for your projects:

  1. It has an amazingly elegant programming model that abstracts DOM manipulation into simple method calls that just “make sense”. Any sort of DHTML logic is now trivial. AJAX is also simple.
  2. It ensures that your code will work across the major browsers.
  3. It is, as they say on their site, “unobtrusive”. It is. It does not care what technology you’re using on the server side. Use it with anything. For AJAX logic, it just deals with URLs and good old HTTP (standards of “the web”) and there is no associated server side component such as a “tag” library that generates javascript in your pages (ugh).
  4. There is a thriving community of Plugins built on top of the core API that run the gamut of things you’ll need to do. Whatever you’re trying to do, look there first!
  5. Their site and documentation is a model for open-source projects. Nice work!

I’ll leave it at that. Thanks jQuery, for being awesome.