A practical walkthrough of using map/reduce with MongoDB to aggregate statistics for generating a report.
Sugar augments the existing JavaScript environment with helper methods on existing objects. From fixing broken support of standard methods, widening acceptable arguments, multi-lingual and improved regex support on strings, nice supplementary string methods like words()
, and shortcut methods to Math object methods. Additional helpers for Dates, Objects, Functions and Regex. An library for a consistentising JavaScript across different imlementations.
Addy Osmani introduces backbone.js as one part of the toolkit for building mobile JavaScript web applications. Backbone is an MVC-like framework to structure your application, simplifies server-side persistence, decouples the DOM from data, succinctly separates apps into Models, views and routers and provides synchronisation between DOM, model and collections.
JavaScript is coming more and more to the fore as a server-side language with a new generation of servers based on the CommonJS (ServerJS) standard. Kris Zyp one of the active members working on CommonJS gives us a summary of the state of play (from January 2010). This includes future directions such as concurrency, promises. And also includes a brief overview of many server-side JavaScript frameworks including Node.js
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.
Using console.log outside of Firefox? Here's Joe Hewitt's simple JavaScript file to allow console.log to work on Internet Explorer, Opera and Safari. Reference the script in the page you want to debug, and add a class of debug into the HTML element, and you have a JavaScript console. There's also a command line - just like the real Firebug.
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.
A Firefox extension to detect memory leaks caused by JavaScript. It pops up an alert dialogue when windows close if there is code still pointing to JavaScript objects.
An online copy of O'Reilly's 2002 book Creating Applications with Mozilla. It focused on pre-1.0 versions of Mozilla, so details about the application structure has changed, but the XUL elements are relatively stable.
Stuart Colville investigates the differences between form.getAttribute('action') and form.action, also the cross-browser differences, when the action is a relative URL. One way returns a relative URL, and the other returns a fully qualified URL.
JavaScript documentation surrounding version 1.5, 1.6 (supported by Firefox 1.5 and Mozilla 1.8), and version 1.7 (supported by Firefox 2.0). Backed up by mailing lists, newsgroups and an IRC channel
All JavaScript implementations implement a debugger statement, which can be called at any point in your script. Also we have console.debug in Firebug.
Another Douglas Crockford video. This time Douglas talks about the Document Object Model, about how Java failed, and JavaScript evolved thanks to DHTML and DOM. He talks about how to use DOM to traversing and manipulating elements in an HTML document, walking the DOM, making elements, innerHTML, as well as Events, memory leaks. He talks about the cracks in DOM, and how we must be prepared to back off when we hit the browser limits of DOM.
First in a series of talks from Douglas Crockford about the JavaScript language. These talks cover the JavaScript language, from the history, the language, advanced features, platforms, standards and programming style. Talks about inheritance, using functions to build objects, closures, as well as the basic JavaScript syntax. Also covers code conventions. JavaScript is a language that requires discipline.
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.
Svend Tofte puts together a detailed guide to setting up and using the Venkman debugger. From basic debugging to watchlists and call stacks, breakpoints, and more advanced techniques like meta comments and profiling. It also contains a list of other useful Venkman resources.
Apart from being an elegant debugger, FireBug offers the developer hooks that can be used from JavaScript, offering logging, assertions, performance measuring, and command line functions for inspection or traversing a document.
Building extensions for Firefox 1.5. The Firefox and Mozilla platforms keep changing the extensions enough to out-date tutorials. This is the official documentation, covering the directory structure, the manifest, XUL Overlays, chrome URIs and packaging
A collection of gotchas and guidance in Greasemonkey scripting. Positioned as an addition to Mark Pilgrim's dive into Greasemonkey
Mark Pilgrim's essential online book about developing Greasemonkey scripts. Excellent starting point for Greasemonkey developers. Covers everything from setting up a Greasemonkey scripts to common DOM coding idioms, as well as a brief rundown of XPath, and case studies of Greasemonkey scripts.
Mark Pilgrim dissects the security issues of the 0.3 Greasemonkey, and describes how the new architecture of Greasemonkey works, pointing out pitfalls and how to address them.
All of the tools you need to poke, prod, and monitor your JavaScript, CSS, HTML and Ajax are brought together into one seamless experience, including a debugger, error console, command line, and a variety of fun inspectors.