JavaScript Weekly
Issue #38 - August 5, 2011

Welcome to issue 38 of JavaScript Weekly. The build system for the newsletter has been rewritten this week so you may notice some minor formatting tweaks. There are big things coming up ahead and I'm getting ready for them :-) For now, though, on with the links.

Headlines

jQuery Mobile Beta 2 Released
The jQuery Mobile team has released beta 2. It brings a bunch of big improvements to the library including decoupled widgets, DOM cache management, page pre-caching and, of course, a lot more. Beta 3 will come in the next month and the first release candidate shortly thereafter.

Google Working on 'Web Intents' To Tie Web Apps Together
Google's Chrome team talks about 'Web Intents', a new Web platform API to provide functionality for webapps to interconnect and make better use of each other without leaning on complicated proprietary APIs. Naturally, this is a JavaScript-based technology.

Articles

Building Mobile JavaScript WebApps With Backbone.js & jQuery: Part I
Addy Osmani kicks off a two-part tutorial on building complete mobile webapps in JavaScript using Backbone.js, jQuery Mobile and LABjs. In this part he does a run-down of Backbone 0.5.2's models, views, collections and routers as well as how to namespace your app.

What's a Closure? An Awesome Interactive JS Tutorial
Ever wonder what closures are and how they work? You can learn about them right now through these awesome interactive, browser-based lessons. This looks like it could be the first in, hopefully, a long line of similar tutorials.

Why You Should Use XMLHttpRequest Asynchronously (or Why IE9 Is Hanging A Lot)
Over on the Windows Error Reporting blog, Dom R notes that 8.4% of all hangs in IE9 in the past month are caused by XMLHttpRequest objects blocking the UI thread with a synchronous request. He explains how to avoid this problem.

A Close Look at Crankshaft, V8's Optimizing Compiler
Andy Wingo takes a deep and technical look at V8's optimizing compiler, Crankshaft. This is great stuff but highly technical and for compilation and VM fans only.

Backbone.js Tips: Lessons From The Trenches
Prateek Dayal of SupportBee shares a few quick Backbone.js tips that he's picked up from building a single page app for customer support.

Building my Own [something] to JavaScript Compiler
Brad Robinson looks at some of the options for compiling a more statically typed language into JavaScript. There's also a follow up (link at bottom of his post called "A Language Called [something]") which goes into more details about how his new language will work.

Building the SoundCloud Mobile Site using Backbone.js

Videos or Media

Yehuda Katz on The Road to SproutCore 2.0
In this 40 minute talk, Yehuda Katz covers the basics of SproutCore's architecture and the major improvements in SproutCore 2.0. If you're unfamiliar with SproutCore, it's a popular framework for creating desktop-like app experiences in the browser.

Easy Node.js Apps with Lisp
In a talk at the LA Ruby Conference 2011, Giles Bowkett talks, curiously, about Node.js, and demonstrates how you can use Sibilant, a Lisp written on top of Node.js, to build Node.js apps.

The JavaScript Bibliography by O'Reilly
The JavaScript Bibliography is a free 66 page e-book by O'Reilly (available in ePub, Mobi and PDF formats) that walks through about 70 different JavaScript books on various topics from different publishers, including a quick summary of each.

Code and Libraries

Put-Selector: Easier DOM Element Creation
Put-Selector is a speedy, lightweight function for creating and manipulating DOM elements with succinct, elegant, familiar CSS selector-based syntax. It sure beats messing around appending things or cheating with document.write :-)

jQuery.fracs: Determine The Visible Fractions of an Element
jQuery.fracs determines the fraction of an HTML element that is currently in the viewport, as well as the fraction it takes up of the complete viewport and the fraction of the area that might possibly be visible. The on-page demo demonstrates it best of all.

git.js: A Git Implementation in Pure JavaScript
It's still early days it seems but git.js is a Git implementation written in pure JavaScript by Daniel Lucraft. It has both a command-line node.js client and an in-browser repo API for accessing Git repositories over HTTP.

Docpad: Static Site Generator in Node.js + CoffeeScript
Docpad is a Jekyll-like (a Ruby project) static site generator built in CoffeeScript. It's essentially a text file based CMS with a templating system and document model.

Candy - a JavaScript-based multi-user chat client

NSSocket: Namespace-based Event-based Buffered TCP/TLS Streams for Node.js

Cutter.js: Cut Text Up By Word Counts
Cutter.js is a simple JavaScript function that can truncate HTML code to a particular word length without losing markup. Handy.

Agility.JS: A Succinct, Super Lightweight MVC Library

Last but not least..

Text-To-Speech in JavaScript
This is an interesting demo of a C++ text to speech synthesizer that has been converted to JavaScript using Emscripten. It's currently limited to Chrome and Firefox (by my testing) and the JavaScript comes out to a whopping 1.2MB.