The JavaScript blog.


libraries date screencasts time maths backbone.js

Backbone.js Screencasts, XDate, JavaScript BigInteger Library

Posted on .

Backbone.js Screencasts

Backbone.js Screencasts is a commercial set of
Backbone.js tutorials from 30 Cubits that costs \$9 (until November 9th, then \$18 thereafter) for 106 minutes of videos. The videos cover the
core Backbone.js functionality like views, routers, events, models,
collections, and also how to use other JavaScript techniques alongside
your Backbone.js code.

There's a preview of the content on Vimeo here: Backbone.js Quickly -


XDate (GitHub: arshaw / xdate, License: dual MIT and GPL)
by Adam Shaw is a wrapper around Date that provides
improved date parsing, formatting, and manipulation. XDate format
really help with
formatting dates, which I find myself doing a lot lately in Node or
single page applications.

Here's an example of XDate's formatting method:

new XDate(2011, 0, 1, 6, 0).toString('d/M/yy h(:mm)TT');

Another useful feature of this library is the set of XDate diffing
. They provide a friendly API
around date subtraction.

Most of XDate's methods return an XDate, so it's chainable

d1 = new XDate();
d2 = d1.clone()

JavaScript BigInteger Library

The JavaScript BigInteger Library
(GitHub: silentmatt / javascript-biginteger,
License: MIT) by Matthew Crumley is a BigInteger library for
JavaScript. The author has written detailed blog posts on how the
library works and the algorithms behind it:

If you look at the source, you'll probably notice that I'm actually using base 10000000, not base 10. I'm using decimal in these examples because it makes things clearer but everything works pretty much exactly the same way in any base. Using a larger base just makes things more efficient because you get 7 digits in each array entry.

Matthew created this library to support his Google Chrome Scientific


jquery plugins screencasts

jQuery Roundup: Screencasts, $.data() Tutorial, Rails Switching to jQuery

Posted on .

More jQuery Screencasts

I've previously mentioned Josh Timonen's awesome screencasts, and he
sent us two more jQuery-focused tutorials:

Linking JavaScript Objects to HTML Elements

In Linking JavaScript Objects to HTML
Tait Brown discusses using the \$.data() function to
maintain relationships between markup and server-side data. It's written
from a designer's perspective, which was interesting to me (as a
predominantly server-side developer).

Rails 3.1 Shipping with jQuery

David Heinemeier Hansson announced that Rails 3.1 is moving to
as the
built-in JavaScript library. Rails had previously bundled Prototype and
had tight integration with script.aculo.us.


jquery events plugins screencasts

jQuery Roundup: jQuery 1.5.1, jQuery Conference, Screencasts

Posted on .

jQuery 1.5.1 Released

jQuery 1.5.1 has been released. This
version supports IE9 as a "top level" browser, fixes a lot of bugs, and
adds new options to jQuery.ajax() (isLocal,
mimeType, and xhrFields).

There will be a meeting about 1.6 on noon EST, March 7th in
#jquery-meeting on irc.freenode.net.

jQuery Conference 2011

jQuery Conference 2011 will be held at the Microsoft Silicon Valley Research Center in Mountain
View, California on April 16th and 17th, 2011.

The jQuery blog has more details: San Francisco Bay Area Conference

jQuery Screencasts

Josh Timonen sent me these very professional jQuery screencasts:
Introduction to jQuery and
Using AJAX with jQuery.

The Introduction to jQuery video starts from the basics, even explaining
the reasoning behind unobtrusive JavaScript.


server games node screencasts email

Node Roundup

Posted on .

Welcome to the Node Roundup. Send in your apps and libraries using our
contact form or @dailyjs.


NodeCasts.org has a screencast about Node by Emerson Macedo, hosted on YouTube with 720p available. He has a Twitter
account at @NodeCasts where you can
request topics for future casts.


Have you been playing Minecraft? One
of my Minecraft buddies found
Nodecraft by Jeremy Apthorp. It's not intended for general use yet, but there's some interesting
JavaScript in there, like
protocol.js. You can see stuff like the server packet structure:

var serverPacketStructure = {
    0x00: [],
    0x01: [int('playerID'), str('serverName'), str('motd')],
    0x02: [str('serverID')],
    0x03: [str('message')],
    0x04: [long('time')],
    0x05: [int('invType'), items('items')],
    0x06: [int('x'), int('y'), int('z')],
    0x0d: [double('x'), double('y'), double('stance'), double('z'),
           float('rotation'), float('pitch'), bool('flying')],

I have a feeling Node would be a pretty good platform for a game server.
I don't know if Apthorp intends to keep working on this, but it's still
interesting to look at what he's done so far.


Tempalias (MIT) by Philip Hofstetter is a Node app for generating temporary email addresses. It's
actually used by tempalias.com.

The frontend code is pure HTML/CSS/JavasScript using Sammy for the interesting part of the logic. You will find that in public/*. The beef of the code lies in the SMTP proxy (lib/tempalias_smtp.js) and in the model class representing an alias (lib/tempalias.js). Static webpages are served by the web server (lib/tempalias_http.js) using node-paperboy which is - as are all other dependencies - located in deps/ as a git submodule.

It's been around for a while, but it looks like it's still alive. It's
one to file under your 'full node app' bookmarks.