Spreading jQuery

categories: front-end development, javascript, jquery

I just came across this post in my Google Blog Search jQuery feed. It's a quick story of how a developer convinced a corporation to use jQuery for an application, and it caught my eye because I was in a similar boat a few months ago.

A colleague had come up with a concept for a new home page for one of our major clients, and 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 lot of things differently if I had it to do over again, and while there were some limitations on the client's server that I wish I hadn't had to get around, I'm not unhappy with the results.

What's been interesting to see since then, though, is how jQuery has spread to other parts on the site. Once it was on the production server and an integral part of the home page, it became a tool we could legitimately use for other purposes -- before, I would have been hard-pressed to convince people we needed a whole new javascript library to implement a little interactivity. When the home page was launched, suddenly a whole slew of possibilities opened up. We could use the innerFade plugin to do a slideshow that we would have previously had to set up in Flash -- or just not done it at all. I could write a tabbed content plugin to use when the client wanted to maximize the screen real estate "above the fold." I could used it to revamp a whole class of content templates, and again to rewrite a clunky form validation script, and again to make a little javascript calculator application. The client was happy because suddenly they were able to get fancy treatment like tabs on run-of-the-mill pages; we were happy because suddenly we could provide fancy treatment by including a couple of javascript files and writing a line or two of code.

My point: get your foot in the door with a compelling initial use of jQuery. After that, write less and do more to your heart's content.

Comment