5 Things Everyone Could Learn From the jQuery Source

Okay, let me just start off by saying that in the world of web software development, jQuery is a tool that I use every single day. As such, it’s a tool that has taught me a great deal about how to accomplish what I want to do in wise, efficient ways. Getting involved with the jQuery community by blog-surfing and attending a number of online conferences regarding jQuery has taken my skills and brought them to another level. To be inspired the same way that I have, check out a copy of the jQuery source at http://code.jquery.com/jquery-2.0.0.js. This post is targeted at the developer who knows how to read and write JavaScript but isn’t a full-fledged ninja yet. Ideally, if you’re reading this, you’re a developer that wants to take your skills to the next level.

A good example of how the jQuery source can inspire is the ’10 things I learned from the jQuery source’ webcasts (there’s a sequel, too) by Paul Irish. Paul Irish (http://www.paulirish.com) is a member of the jQuery team who has done a couple of very informative webcasts going through some great things that are contained in the jQuery source code. If you haven’t seen them, I highly recommend going through them. Check out his site for those goodies and more development goodness that is there. He gives a lot to be learn, however I have also noticed that the better you are at JavaScript and jQuery, the more likely you are to get some solid value out of his webcasts. It’s like watching the Godfather. It’s a great story, good movie. But if you’re a film buff, or work in the industry, you quickly see the brilliance that is that movie.

In that spirit, I want to offer five things that everyone should learn from the jQuery source code. These are tips and techniques that will improve your skill as a coder, and ultimately make you a better developer. And that’s what we’re all after anyway, right? Plus, these are small improvements in how you write your code meaning they are more accessible to the novice to intermediate developer. So, without further adieu, let’s get started. The next five posts you’ll read will all be dedicated to this theme.

Here is an index to them in case you want to get to a particular one:

  1. Building Better Objects
  2. Explicit Equivalence
  3. Testing Type
  4. Cash in On Caching
  5. Logical Looping

Thanks for reading, and please let me know if you have any questions or comments!

Published 3 Feb 2011

Writing better code by building better JavaScript
Don Burks on Twitter