Klaus Komenda takes us through the history of development patterns of JavaScript demonstrating the pros and cons. Taking a typical JavaScript feature he starts with the old-school global functions method and iterates through a Singleton, Module Pattern, Revealing Module Pattern, Custom Objects and Lazy Function Definitions bringing the same feature up-to-date.
Ivo Wetzel covers some of the quirks of the JavaScript language. Some of these cause subtle bugs, some overturn conventional wisdom. It covers toString on numbers. Covers the advanced JavaScript features such as prototypal inheritance, this, closures, anonymous wrappers, type-casting, automatic semicolon insertion and hoisting of function and variable declarations.
From Mozilla: An overview of the object-oriented capabilities of JavaScript. This covers OO concepts of classes and objects, instances, abstraction, encapsulation and polymorphism as done in JavaScript with functions and prototypal inheritance.
Erik Arvidsson warns against extending the JavaScript Object with Object.prototype, as it can lead to breakages in third party code when they use the for(key in obj) method of iterating through any class (since they all are subclasses of Object). Instead Erik recommends extending the classes that directly benefit from the extending functions, and treat Object as a final constant. Erik also suggests that hashes and associative arrays should be done in JavaScript using Object, not Arrays.
Douglas Crockford's presentation on Advanced JavaScript. He covers topics such as inheritance, modules, debugging, efficiency and JSON.
Although JavaScript is a class-free, object-oriented language using prototypal inheritance, it can still be used in a classical object-oriented way. Douglas Crockford compares the two inheritance-based systems, adding syntactic sugar to JavaScript to allow classical inheritance, and demonstrates a number of patterns that are not available in classical languages.
Matt Kruse's JavaScript Toolbox presents a number of excellent best practice ideas including: using var, feature detection, when to use square bracket notation, avoiding eval, referencing forms and form elements, avoiding the with keyword, using onclick instead of JavaScript pseudo-protocol, using unary + to type convert to numbers, avoiding document.all, not using HTML comments in script blocks, avoid cluttering the global namespace, avoiding prototype.js, avoiding synch Ajax calls, using JSON and the correct way to use script tags
Tim explains object orientation in the context of JavaScript, covering concepts like object literal, encapsulation, inheritance using prototype, composition through association and aggregation, polymorphism. Useful read for OO-aware developers to grasp some of the potential of JavaScript.
Guides, notes, overviews, documentation for the Prototype library. Pathfinder compiles a list of useful resources for this library.
Ryan Campbell shows how to get the Prototype library up and running, and introduces and documents Protoype's $() function. Form helper functions, getElementsByClassName functions, Element helper functions, Ajax support, timer functions are all covered.
Michael Mahemoff runs into a problem with Protypes $$ function when looking for class names. Its taking over 90 seconds when more than 100 matches are returned. The advice is: Avoid $$(".classname") on large DOMs.
Douglas Crockford discusses his method of exposing the powerful prototypal inheritance from JavaScript, using his object function which untangles JavaScript's classical-adopted constructor pattern.
An explanation of scope in terms of an execution context and scope chain. Also describes how we can alter the this reference using apply and call.
An overview of object literals and object oriented programming, referencing attributes and functions, prototype objects, creating singletons.
Ryan Campbell volume tests Prototype's each() Enumeration function and finds that although the code is more elegant than the for loops, the overhead is quite heavy, and the performance impact too high. The summary: If basic JavaScript will do the task, then use basic JavaScript
LowPro is a scripting extension to Prototype written by Dan Webb to make unobtrusive DOM Scripting much easier. Included are an onReady event, adding behaviour using CSS selectors, fixing the this reference to always refer to the element within events, and a mechanism for triggering events.
Dustin Diaz names his top ten list, which includes Scott Andrew's addEvent(), Dean Edwards' cssQuery(). The cookie manipulation functions take the first three places, and the Prototype $() gets an honourable mention. Dustin also includes a JavaScript file containing all 10 favourite methods.