Unintentionally Blank

Phil Nash on the Internet, Web Standards and Accessibility

The JavaScript Library Trap

Feb 07, 2008

by Phil Nash

Recently I used a couple of JavaScript frameworks for the first time. Previously I have been trying to understand the JavaScript that underpins all the available libraries along with the fights to get different browsers to behave the same way. I never planned to use a library until I fully understood what was going on, but a project at work was kicked off with jQuery and I was left to discover how easy it all was by myself. Then, a couple of weeks later, a JavaScript course paid heavy attention to Prototype. The ease of slipping into using either of these libraries got me thinking.

Falling In Love... With A Library

I've been using it for no more than two weeks and jQuery feels like a hammer, all my JavaScript problems look like nails. My problem is that I know I shouldn't be falling for just the one library, but I don't know where else to look! I read through Jonathan Snook's slides from Web Directions North 08 on workin with AJAX frameworks and I am waiting for the podcast for greater detail.

What I really want to know is, what is the best way not to fall into the JavaScript library trap? If you use libraries, which ones do you use and how do you decide? How do you decide when not to use one too, as that is all important? And finally, do you have your own library of your own utility functions?

I hope you can help me out with your experience.

Unintentionally Blank is Phil Nash's thoughts on web development from 2006-2008. Any code or opinions may be out of date.