2007 in review: the year the JavaScript libraries landed
I used four JavaScript libraries for the first time this year: jQuery, Prototype, MooTools and Scriptaculous. I was not evaluating them. Each one arrived attached to something else I had installed, which is exactly how the era worked.
Assembling sites out of scripts
A site that year was a base plus a collection of downloaded components: a photo gallery here, a guestbook there, a lightbox, a menu. Each shipped its own JavaScript library, so a page could end up loading two frameworks that solved the same problem in incompatible ways.
The debugging technique this produced is one I still use, though the cause has mostly gone away: when two components each work alone and break together, stop reading the code and start removing things.
Why jQuery won, from where I was standing
Not because it was more capable. Because of the two-year-old problem I wrote about last year: finding an element and attaching a behaviour took a branch per browser. jQuery deleted that.
// before
var el = document.getElementById ? document.getElementById('menu') : document.all['menu'];
// after
$('#menu')
That is the entire pitch, and it was enough. A library that removes a tax rather than adding a capability spreads faster, because you do not have to change how you think to adopt it.
Which is worth remembering about any library that spreads this fast: it is standing in for something the platform should be doing. If browsers ever agree on a way to select an element and attach a handler, most of the reason to load this disappears.
Another CMS on the pile
Also this year: a large open-source CMS with its own template language, configuration hierarchy and cache layer. My third or fourth system.
At the time each addition looked free, because each one arrived with a paying project attached. The cost only becomes visible when you count the systems you must stay current on rather than the projects you have. I have not done that arithmetic yet. I can feel that I am going to have to.
In short
Four JavaScript libraries arrived in the same year, each attached to something else I installed. A fourth CMS joined the pile.