MSDN reports that 8.4% of all IE9 hangs recently are caused by XMLHttpRequest objects blocking the UI thread because they are using synchronous requests instead of asynchronous. This is a good example of the harm of working against the grain of asynchronous approach in a single-threaded JavaScript environment.
Dan Webb describes curried functions as a way of creating reusable callback functions for event handlers or Ajax requests, or anything that takes a function as an argument. By using closures, curried functions have a simple way of persisting data between calls. He also offers an elegant way of running a lots of methods on objects, with a simple map function written as a curried function.
The Yahoo! Web Developer Network provides a one page overview of JSON, giving a quick tutorial on JSON, how to get Yahoo! Web services to emit JSON, offering an output of a JSON object literal as well as using a callback function method. Yahoo! also describes how their web services typically translate their XML structures into JSON.
Ryan Campbell of Particletree offers a step-by-step guide to getting started with JSON. Since JavaScript can use JSON to either send or receive from the server (both parts of an AJAX request), Ryan suggests getting started with sending JSON (after stringifying it) to the server and converting it to a server side object. Then sending that object back, encoded as JSON, to the client and process that. He offers working library code for both JavaScript and PHP (for the server part).
Simon Willison blogs about how JQuery won him over. From its faddish start based around CSS selectors (getElementsBySelector), and method chaining, Simon now sees the library in a new light. Simon shows how jQuery supports modern development best practice such as namespaces, giving a quick nod to the richness of jQuery selectors (DOM, CSS and XPath). JQuery's event handling looks natural and offers an event when the dom is ready. It exposes custom events for non-trivial Ajax requests. Simon's so convinced about jQuery that he's willing to overlook his rule that developers should know how a library works before using it.
Exploring the features of Firebug, with code examples covering using the console, timing code, stack traces, debugging and breakpoints, profiling, tracing HTTP requests. An excellent overview of Firebug's functionality
Tim Huegdon and Mark Aidan Thomas create an elegant wrapper to the YUI Connection Manager that manages repeating Ajax JSON requests. Tim describes the use of Custom Events, and the use of the Observer design pattern, dissects the code and offers a tidy demonstration of the working code. This simplifies JSON requests into declaring a simple function to process the returned JSON object, and a single line to fire off the request (within a setInterval if required)
A BetterExplained article that discusses how to reduce the initial load time of JavaScript files. Covers measuring load times, and a number of approaches to delaying the loading of a JavaScript file. Also covers minifying JavaScript and maintaining a debug version of code. Also covers an AJAX onLoad pattern to dynamically include JavaScript after page load, and HTTP caching of external JavaScript files
Webkit have released Web Inspector, which is a Firebug-type tool for Webkit and Safari. Contains Firebug related features like categorising resources, JavaScript console, HTTP network monitor, load time and resource size monitors, inline JavaScript and HTML error reporting.
As web pages become more and more like applications, code performance becomes more and more important. This article looks at a number of performance issues to avoid, in EcmaScript, DOM and AJAX requests. Covers eval, the with keyword, try/catch in performance-critical code, global variables, implicit object conversion, string concatenation, primitive operations over function calls, repainting and reflowing documents, modifying elements, using XPath.
Jack Slocum presents a simple recipe to avoid memory leaks, including setting onreadystatechange to null on completion of an XMLHttpRequest, clean up DOM Event handlers on unload, never put non-primitives into a DOM node.
Instead of creating a new XmlHttpRequest object for every request, this post provides code to pool these objects together and reuse them. This saves a great deal of processing times, particularly in IE.
A collection of animated 'in progress' graphics for use in Ajax applications. Includes clock-type indicators and progress bars.
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
Three top features of jQuery: the multitude of selectors, manipulating attributes, and tacking Ajax/JSON requests. Choses jQuery over Prototype
Joe Hewitt, in this Dr Dobbs article talks about using the Firebug extensions to inspect and debug Ajax applications (or any browser-based JavaScript application). It also has CSS inspecting capabilities, editing JavaScript on the fly, inspecting HTTP request and responses, logging, breakpoint debugging and profiling. A useful howto.
Christian Heilmann offers us Dishy, a JavaScript REST API for talking to del.icio.us. Taking full advantage of del.icio.us' JSON format and the script element, Dishy doesn't need a server-side proxy. Its a useful helper class for easily getting information from del.icio.us.
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.
PPK describes the three main data formats for requesting data from the server, weighing up the advantages and disadvantages. In the ensuing discussion the general feeling is that JSON is the most popular and simplest method.
Gez Lemon reviews Christian Heilmann's recently published book. Its a thumbs up, and recommended for developers working with standards and accessibility, regardless of their JavaScript level.
Covers all the methods available on the jQuery library, along with inline code examples. Interestingly, the same documentation is also available as XML and JSON.
A useful overview / introduction of the jQuery library, covering using selectors and XPath expressions to target specific elements in a document, simple Ajax requests, the basic animations available, restructuring a document, creating jQuery plugins.
A lightweight library designed to elegantly dealing with common, repetitive tasks. Great as a small library to handle getting various nodes in a document, adding events, and rendering simple effects.