<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en-us" xmlns="http://www.w3.org/2005/Atom"><title>Simon Willison's Weblog: prototype-js</title><link href="http://simonwillison.net/" rel="alternate"/><link href="http://simonwillison.net/tags/prototype-js.atom" rel="self"/><id>http://simonwillison.net/</id><updated>2010-04-11T22:03:39+00:00</updated><author><name>Simon Willison</name></author><entry><title>What's wrong with extending the DOM</title><link href="https://simonwillison.net/2010/Apr/11/extending/#atom-tag" rel="alternate"/><published>2010-04-11T22:03:39+00:00</published><updated>2010-04-11T22:03:39+00:00</updated><id>https://simonwillison.net/2010/Apr/11/extending/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://perfectionkills.com/whats-wrong-with-extending-the-dom/"&gt;What&amp;#x27;s wrong with extending the DOM&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Detailed explanation of the problems that crop up from extending built-in DOM objects using JavaScript, from Prototype developer kangax. Prototype 2.0 will be dropping this technique entirely—will MooTools follow suit?


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/javascript"&gt;javascript&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/kangax"&gt;kangax&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/monkeypatching"&gt;monkeypatching&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/mootools"&gt;mootools&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/prototype-js"&gt;prototype-js&lt;/a&gt;&lt;/p&gt;



</summary><category term="javascript"/><category term="kangax"/><category term="monkeypatching"/><category term="mootools"/><category term="prototype-js"/></entry><entry><title>Google AJAX Libraries API</title><link href="https://simonwillison.net/2008/May/27/ajax/#atom-tag" rel="alternate"/><published>2008-05-27T17:56:47+00:00</published><updated>2008-05-27T17:56:47+00:00</updated><id>https://simonwillison.net/2008/May/27/ajax/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://code.google.com/apis/ajaxlibs/"&gt;Google AJAX Libraries API&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Google are hosting copies of jQuery, Prototype, mooTools and Dojo on their CDN, with a promise to permanently host different versions and an optional JavaScript API to dynamically load the most recent version of a library. I wish they’d stop capitalising Ajax though.

    &lt;p&gt;&lt;small&gt;&lt;/small&gt;Via &lt;a href="http://ajaxian.com/archives/announcing-ajax-libraries-api-speed-up-your-ajax-apps-with-googles-infrastructure"&gt;Ajaxian&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/ajax"&gt;ajax&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/cdn"&gt;cdn&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/dojo"&gt;dojo&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/google"&gt;google&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/jquery"&gt;jquery&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/libraries"&gt;libraries&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/mootools"&gt;mootools&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/prototype-js"&gt;prototype-js&lt;/a&gt;&lt;/p&gt;



</summary><category term="ajax"/><category term="cdn"/><category term="dojo"/><category term="google"/><category term="jquery"/><category term="libraries"/><category term="mootools"/><category term="prototype-js"/></entry><entry><title>getElementsByClassName pre Prototype 1.6</title><link href="https://simonwillison.net/2008/Mar/26/john/#atom-tag" rel="alternate"/><published>2008-03-26T08:28:05+00:00</published><updated>2008-03-26T08:28:05+00:00</updated><id>https://simonwillison.net/2008/Mar/26/john/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://ejohn.org/blog/getelementsbyclassname-pre-prototype-16/"&gt;getElementsByClassName pre Prototype 1.6&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Older releases of Prototype break in Firefox 3 and Safari 3.1 due to unsafe namespace management—getElementsByClassName is now a browser built-in but with different semantics to the Prototype method of the same name. Prototype 1.6 is fine.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/firefox3"&gt;firefox3&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/getelementsbyclassname"&gt;getelementsbyclassname&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/javascript"&gt;javascript&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/john-resig"&gt;john-resig&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/namespaces"&gt;namespaces&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/prototype-js"&gt;prototype-js&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/safari"&gt;safari&lt;/a&gt;&lt;/p&gt;



</summary><category term="firefox3"/><category term="getelementsbyclassname"/><category term="javascript"/><category term="john-resig"/><category term="namespaces"/><category term="prototype-js"/><category term="safari"/></entry><entry><title>querySelector and querySelectorAll</title><link href="https://simonwillison.net/2008/Feb/8/surfinu/#atom-tag" rel="alternate"/><published>2008-02-08T11:21:03+00:00</published><updated>2008-02-08T11:21:03+00:00</updated><id>https://simonwillison.net/2008/Feb/8/surfinu/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://webkit.org/blog/156/queryselector-and-queryselectorall/"&gt;querySelector and querySelectorAll&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
WebKit now supports the W3C Selectors API. Expect the various JavaScript libraries to add this as an optimisation to achieve massive speedups (Prototype are already working on it).


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/javascript"&gt;javascript&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/libraries"&gt;libraries&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/prototype-js"&gt;prototype-js&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/queryselector"&gt;queryselector&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/safari"&gt;safari&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/selectors"&gt;selectors&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/w3c"&gt;w3c&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/webkit"&gt;webkit&lt;/a&gt;&lt;/p&gt;



</summary><category term="javascript"/><category term="libraries"/><category term="prototype-js"/><category term="queryselector"/><category term="safari"/><category term="selectors"/><category term="w3c"/><category term="webkit"/></entry><entry><title>Low Pro For jQuery?</title><link href="https://simonwillison.net/2008/Feb/3/danwebbnet/#atom-tag" rel="alternate"/><published>2008-02-03T22:16:04+00:00</published><updated>2008-02-03T22:16:04+00:00</updated><id>https://simonwillison.net/2008/Feb/3/danwebbnet/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://www.danwebb.net/2008/1/31/low-pro-for-jquery"&gt;Low Pro For jQuery?&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Dan Webb on why he prefers Prototype over jQuery: “The one big reason was that, while jQuery was super simple and concise when working on smaller projects, it offered no help in structuring larger applications”.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/dan-webb"&gt;dan-webb&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/javascript"&gt;javascript&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/jquery"&gt;jquery&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/libraries"&gt;libraries&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/lowpro"&gt;lowpro&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/prototype-js"&gt;prototype-js&lt;/a&gt;&lt;/p&gt;



</summary><category term="dan-webb"/><category term="javascript"/><category term="jquery"/><category term="libraries"/><category term="lowpro"/><category term="prototype-js"/></entry><entry><title>Pseudo-custom events in Prototype 1.6</title><link href="https://simonwillison.net/2007/Nov/9/prototype/#atom-tag" rel="alternate"/><published>2007-11-09T23:02:54+00:00</published><updated>2007-11-09T23:02:54+00:00</updated><id>https://simonwillison.net/2007/Nov/9/prototype/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://www.andrewdupont.net/2007/11/07/pseudo-custom-events-in-prototype-16/"&gt;Pseudo-custom events in Prototype 1.6&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Useful tutorial showing how to use Prototype 1.6’s custom events to implement a cross-browser mouse wheel event.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/andrew-dupont"&gt;andrew-dupont&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/customevents"&gt;customevents&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/javascript"&gt;javascript&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/mousewheel"&gt;mousewheel&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/prototype-js"&gt;prototype-js&lt;/a&gt;&lt;/p&gt;



</summary><category term="andrew-dupont"/><category term="customevents"/><category term="javascript"/><category term="mousewheel"/><category term="prototype-js"/></entry><entry><title>Upgrading to Prototype 1.6: real world examples</title><link href="https://simonwillison.net/2007/Oct/24/upgrading/#atom-tag" rel="alternate"/><published>2007-10-24T19:19:44+00:00</published><updated>2007-10-24T19:19:44+00:00</updated><id>https://simonwillison.net/2007/Oct/24/upgrading/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://mislav.caboo.se/js/upgrading-to-prototype-1-6-real-world-examples"&gt;Upgrading to Prototype 1.6: real world examples&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
I still don’t find Prototype as intuitive as jQuery, but the API improvements between 1.5 and 1.6 are very impressive.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/javascript"&gt;javascript&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/jquery"&gt;jquery&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/libraries"&gt;libraries&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/prototype-js"&gt;prototype-js&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/radiantcms"&gt;radiantcms&lt;/a&gt;&lt;/p&gt;



</summary><category term="javascript"/><category term="jquery"/><category term="libraries"/><category term="prototype-js"/><category term="radiantcms"/></entry><entry><title>Prototype 1.6.0 release candidate</title><link href="https://simonwillison.net/2007/Aug/16/prototype/#atom-tag" rel="alternate"/><published>2007-08-16T08:49:54+00:00</published><updated>2007-08-16T08:49:54+00:00</updated><id>https://simonwillison.net/2007/Aug/16/prototype/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://prototypejs.org/2007/8/15/prototype-1-6-0-release-candidate"&gt;Prototype 1.6.0 release candidate&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Prototype gets a long-needed update to its Event API, and some interesting new Function.prototype extensions.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/events"&gt;events&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/javascript"&gt;javascript&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/prototype-js"&gt;prototype-js&lt;/a&gt;&lt;/p&gt;



</summary><category term="events"/><category term="javascript"/><category term="prototype-js"/></entry><entry><title>Building Brickslayer</title><link href="https://simonwillison.net/2007/Jul/22/building/#atom-tag" rel="alternate"/><published>2007-07-22T21:28:23+00:00</published><updated>2007-07-22T21:28:23+00:00</updated><id>https://simonwillison.net/2007/Jul/22/building/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://javascriptgamer.com/brickslayer/"&gt;Building Brickslayer&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
New tutorial from Michal Wallace on building games in JavaScript using Prototype.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/brickslayer"&gt;brickslayer&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/javascript"&gt;javascript&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/michal-wallace"&gt;michal-wallace&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/prototype-js"&gt;prototype-js&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/tutorial"&gt;tutorial&lt;/a&gt;&lt;/p&gt;



</summary><category term="brickslayer"/><category term="javascript"/><category term="michal-wallace"/><category term="prototype-js"/><category term="tutorial"/></entry><entry><title>Low Pro Behaviours 101</title><link href="https://simonwillison.net/2007/Jul/17/danwebbnet/#atom-tag" rel="alternate"/><published>2007-07-17T10:09:03+00:00</published><updated>2007-07-17T10:09:03+00:00</updated><id>https://simonwillison.net/2007/Jul/17/danwebbnet/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://www.danwebb.net/2007/7/17/low-pro-behaviours-101"&gt;Low Pro Behaviours 101&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
A neatly packaged method of enhancing an existing DOM element with pre-packaged behaviours.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/behaviours"&gt;behaviours&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/dan-webb"&gt;dan-webb&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/dom"&gt;dom&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/javascript"&gt;javascript&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/lowpro"&gt;lowpro&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/prototype-js"&gt;prototype-js&lt;/a&gt;&lt;/p&gt;



</summary><category term="behaviours"/><category term="dan-webb"/><category term="dom"/><category term="javascript"/><category term="lowpro"/><category term="prototype-js"/></entry><entry><title>Quoting Tom Occhino</title><link href="https://simonwillison.net/2007/Jul/8/mootools/#atom-tag" rel="alternate"/><published>2007-07-08T07:29:16+00:00</published><updated>2007-07-08T07:29:16+00:00</updated><id>https://simonwillison.net/2007/Jul/8/mootools/#atom-tag</id><summary type="html">
    &lt;blockquote cite="http://forum.mootools.net/viewtopic.php?id=4195#post-21406"&gt;&lt;p&gt;MooTools is not compatible with any other javascript framework. If you "definitely need to work with prototype" (which you don't, since the frameworks each provide all the functionality you need to use only one or the other) then learn how to do what you want to do in prototype. Otherwise, learn to use MooTools to do all the things you want to do. They simply do not work together, and I promise they never will.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p class="cite"&gt;&amp;mdash; &lt;a href="http://forum.mootools.net/viewtopic.php?id=4195#post-21406"&gt;Tom Occhino&lt;/a&gt;&lt;/p&gt;

    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/javascript"&gt;javascript&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/libraries"&gt;libraries&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/mootools"&gt;mootools&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/prototype-js"&gt;prototype-js&lt;/a&gt;&lt;/p&gt;



</summary><category term="javascript"/><category term="libraries"/><category term="mootools"/><category term="prototype-js"/></entry><entry><title>Packing Prototype</title><link href="https://simonwillison.net/2007/May/17/painfully/#atom-tag" rel="alternate"/><published>2007-05-17T09:52:08+00:00</published><updated>2007-05-17T09:52:08+00:00</updated><id>https://simonwillison.net/2007/May/17/painfully/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://www.andrewdupont.net/2007/02/26/packing-prototype/"&gt;Packing Prototype&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Why Prototype doesn’t ship with an official compressed version.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/compression"&gt;compression&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/javascript"&gt;javascript&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/javascript-libraries"&gt;javascript-libraries&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/packing"&gt;packing&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/prototype-js"&gt;prototype-js&lt;/a&gt;&lt;/p&gt;



</summary><category term="compression"/><category term="javascript"/><category term="javascript-libraries"/><category term="packing"/><category term="prototype-js"/></entry><entry><title>Ext JS</title><link href="https://simonwillison.net/2007/Apr/3/extjs/#atom-tag" rel="alternate"/><published>2007-04-03T22:11:57+00:00</published><updated>2007-04-03T22:11:57+00:00</updated><id>https://simonwillison.net/2007/Apr/3/extjs/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://extjs.com/"&gt;Ext JS&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Jack Slocum is building a business around his excellent Ext JavaScript library (which can now run on top of YUI, jQuery or Prototype). The library itself is LGPL, but you can pay for a commercial license and support.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/jack-slocum"&gt;jack-slocum&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/javascript"&gt;javascript&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/jquery"&gt;jquery&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/prototype-js"&gt;prototype-js&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/yui"&gt;yui&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/yuiext"&gt;yuiext&lt;/a&gt;&lt;/p&gt;



</summary><category term="jack-slocum"/><category term="javascript"/><category term="jquery"/><category term="prototype-js"/><category term="yui"/><category term="yuiext"/></entry><entry><title>Fork JavaScript</title><link href="https://simonwillison.net/2007/Jan/20/fork/#atom-tag" rel="alternate"/><published>2007-01-20T23:39:39+00:00</published><updated>2007-01-20T23:39:39+00:00</updated><id>https://simonwillison.net/2007/Jan/20/fork/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://forkjavascript.org/"&gt;Fork JavaScript&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
A great name for Yet Another JavaScript Library. This one tries to combine the best bits from YUI and Prototype.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/forkjavascript"&gt;forkjavascript&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/javascript"&gt;javascript&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/prototype-js"&gt;prototype-js&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/yui"&gt;yui&lt;/a&gt;&lt;/p&gt;



</summary><category term="forkjavascript"/><category term="javascript"/><category term="prototype-js"/><category term="yui"/></entry><entry><title>Speeding up Prototype's Selector</title><link href="https://simonwillison.net/2006/Jun/28/speeding/#atom-tag" rel="alternate"/><published>2006-06-28T19:16:33+00:00</published><updated>2006-06-28T19:16:33+00:00</updated><id>https://simonwillison.net/2006/Jun/28/speeding/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://www.sylvainzimmer.com/index.php/archives/2006/06/25/speeding-up-prototypes-selector/"&gt;Speeding up Prototype&amp;#x27;s Selector&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Really smart getElementsBySelector optimisations.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/javascript"&gt;javascript&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/prototype-js"&gt;prototype-js&lt;/a&gt;&lt;/p&gt;



</summary><category term="javascript"/><category term="prototype-js"/></entry><entry><title>Notes on JavaScript Libraries</title><link href="https://simonwillison.net/2006/Jun/26/libraries/#atom-tag" rel="alternate"/><published>2006-06-26T15:03:00+00:00</published><updated>2006-06-26T15:03:00+00:00</updated><id>https://simonwillison.net/2006/Jun/26/libraries/#atom-tag</id><summary type="html">
    &lt;p&gt;&lt;a href="http://www.vivabit.com/atmedia2006/"&gt;@media 2006&lt;/a&gt; was a blast. Great talks, great people and some of the highest production values I've ever seen at a conference (check out &lt;a href="http://www.flickr.com/search/?q=atmedia2006+bags"&gt;the bags&lt;/a&gt;!).&lt;/p&gt;

&lt;p&gt;I sat on the &lt;a href="http://www.vivabit.com/atmedia2006/sessions/#dom"&gt;JavaScript Libraries: Friend or Foe?&lt;/a&gt; panel, with PPK, Dan Webb, Stuart Langridge and Cameron Adams chairing. It was my first participation in a panel and I really enjoyed it - I've always liked the Q&amp;amp;A bit of giving talks. JavaScript Libraries are an enormous topic but I felt we did them justice considering the time available. For the record, here are the key points that I wanted to get across:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Large JavaScript applications need some kind of library&lt;/strong&gt; - even if it's one built especially for that application. There are a number of problems in JavaScript (most of them originating with browser incompatibilities) that any moderately complex application will need to deal with - things like normalised event handling, DOM node selection, sane animation or drag and drop. Solve these problems once so you can get on to the interesting task of building the application. If you can find a library that solves them for you so much the better!&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The big four.&lt;/strong&gt; &lt;a href="http://dojotoolkit.org/"&gt;Dojo&lt;/a&gt;, &lt;a href="http://mochikit.com/"&gt;MochiKit&lt;/a&gt;, &lt;a href="http://prototype.conio.net/"&gt;Prototype&lt;/a&gt;/&lt;a href="http://script.aculo.us/"&gt;Scriptaculous&lt;/a&gt; and the &lt;a href="http://developer.yahoo.com/yui/"&gt;Yahoo! UI Library&lt;/a&gt; are the top of the pile as far as I'm concerned. They cover the bases effectively and each one offers something interesting that makes it worth studying in its own right. If you plan to evaluate some existing libraries these make an excellent starting point.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Leaky abstractions.&lt;/strong&gt; Joel Spolsky's essay &lt;a href="http://www.joelonsoftware.com/articles/LeakyAbstractions.html"&gt;The Law of Leaky Abstractions&lt;/a&gt; is my favourite of all of his online articles. It's basic tenet is that abstractions that are designed to save the programmer time inevitably leak, and if they leak at a lower level of abstraction than the programmer is familiar with they prove almost impossible to debug. Paradoxically, the more time saving abstractions you are using the more you actually have to know.&lt;/p&gt;

&lt;p&gt;JavaScript is possibly the leakiest abstraction of them all, thanks to the many different browser environments it runs in. If you rely on a library to abstract away the browser bugs from you you are certain to run in to a bug that you can't fix sooner or later. Don't use libraries as crutches; if you're not prepared to figure out what the library is doing for you you'll end up in a world of pain further down the line.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Community and documentation matter.&lt;/strong&gt; As with all open-source software, it's a good idea to get a feel for the amount of community activity around a project before you commit to building on it. The big four all have active communities, which means less bugs, more support and a faster rate of improvement. Likewise, good documentation is invaluable.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Libraries should play well with others.&lt;/strong&gt; Reusable code that excludes other code from being reused has severely limited long-term value. In JavaScript, that means that libraries that mess with Object.prototype or pollute global namespaces should be treated with caution. The Prototype library was a major culprit here, but thankfully has cleaned up its act (at least with regards to altering Object.prototype) in recent releases. It's all very well saying that you'll always be using code built with your core language modifications in mind, but you may well change your tune when you try to incorporate Yahoo! or Google Maps and everything breaks.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Go with the grain.&lt;/strong&gt; If you take the time to learn it properly, JavaScript is a powerful and surprisingly elegant language. Good JavaScript code takes advantage of its dynamic, functional nature. Libraries that promise to take the pain out of JavaScript by &lt;a href="http://code.google.com/webtoolkit/" title="The Google Web Toolkit"&gt;writing the code for you&lt;/a&gt; probably aren't as smart as they seem.  Abstractions leak.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Dan Webb has &lt;a href="http://www.sitepoint.com/article/javascript-library"&gt;a good comparison of the big four&lt;/a&gt; on SitePoint, although he did overlook &lt;a href="http://developer.yahoo.com/yui/animation/"&gt;YUI's Animation library&lt;/a&gt; which I consider a highlight.&lt;/p&gt;

&lt;p&gt;For more accurate coverage of the @media panel itself, take a look at my co-worker Paul Hammond's &lt;a href="http://www.paulhammond.org/2006/06/atmedia2/javascript"&gt;detailed notes&lt;/a&gt;.&lt;/p&gt;
    
        &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/atmedia"&gt;atmedia&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/dojo"&gt;dojo&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/javascript"&gt;javascript&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/libraries"&gt;libraries&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/mochikit"&gt;mochikit&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/prototype-js"&gt;prototype-js&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/speaking"&gt;speaking&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/my-talks"&gt;my-talks&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/yui"&gt;yui&lt;/a&gt;&lt;/p&gt;
    

</summary><category term="atmedia"/><category term="dojo"/><category term="javascript"/><category term="libraries"/><category term="mochikit"/><category term="prototype-js"/><category term="speaking"/><category term="my-talks"/><category term="yui"/></entry><entry><title>Painless JavaScript Using Prototype</title><link href="https://simonwillison.net/2006/Feb/22/painless/#atom-tag" rel="alternate"/><published>2006-02-22T08:53:26+00:00</published><updated>2006-02-22T08:53:26+00:00</updated><id>https://simonwillison.net/2006/Feb/22/painless/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://www.sitepoint.com/article/painless-javascript-prototype"&gt;Painless JavaScript Using Prototype&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
The missing manual, by Dan Webb.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/dan-webb"&gt;dan-webb&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/javascript"&gt;javascript&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/prototype-js"&gt;prototype-js&lt;/a&gt;&lt;/p&gt;



</summary><category term="dan-webb"/><category term="javascript"/><category term="prototype-js"/></entry><entry><title>Using prototype.js v1.3.1</title><link href="https://simonwillison.net/2005/Oct/14/using/#atom-tag" rel="alternate"/><published>2005-10-14T14:16:27+00:00</published><updated>2005-10-14T14:16:27+00:00</updated><id>https://simonwillison.net/2005/Oct/14/using/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://www.sergiopereira.com/articles/prototype.js.html"&gt;Using prototype.js v1.3.1&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Prototype: the missing manual.

    &lt;p&gt;&lt;small&gt;&lt;/small&gt;Via &lt;a href="http://wiki.osafoundation.org/bin/view/Projects/AjaxLibraries"&gt;Survey of AJAX/JavaScript Libraries&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/javascript"&gt;javascript&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/prototype-js"&gt;prototype-js&lt;/a&gt;&lt;/p&gt;



</summary><category term="javascript"/><category term="prototype-js"/></entry><entry><title>Object.prototype is verboten</title><link href="https://simonwillison.net/2005/Jul/5/objectprototype/#atom-tag" rel="alternate"/><published>2005-07-05T11:53:14+00:00</published><updated>2005-07-05T11:53:14+00:00</updated><id>https://simonwillison.net/2005/Jul/5/objectprototype/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://erik.eae.net/archives/2005/06/06/22.13.54/"&gt;Object.prototype is verboten&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
This is a problem with the popular Prototype library.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/javascript"&gt;javascript&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/prototype-js"&gt;prototype-js&lt;/a&gt;&lt;/p&gt;



</summary><category term="javascript"/><category term="prototype-js"/></entry></feed>