JavaScript


Tuesday, September 16th, 2008

Secrets of JavaScript Closures

Category: JavaScript

Stuart Langridge gave what looks like a great talk on the secrets of JavaScript closures. I had to chortle a little when I saw this slide: And the follow up slide, showing that Stuart doesn’t agree :) He does go on to show issues with holding on to references and leaking memory, as well as Read the rest…

Posted by Dion Almaer at 6:07 am
3 Comments

+++--
3.2 rating from 18 votes

Jeene: Automatic partial evaluation for JavaScript, in JavaScript

Category: JavaScript

Jeene is a new open source project by Karl Krukow, which aims to create a partial evaluator for JavaScript. A partial evaluator (or program specializer) is a program which takes two inputs: another program and an environment mapping variables to values; it outputs a specialized (i.e., more efficient) version of the input program with respect Read the rest…

Posted by Dion Almaer at 5:29 am
2 Comments

++---
2.8 rating from 13 votes

Monday, September 15th, 2008

Patroon: Another JavaScript Templating Solution

Category: JavaScript, Library

Matthias Georgi has posted the release of Patroon, his new templating system that uses JavaScript. It joins other solutions such as using Django via JavaScript (e.g. Dojo let’s you do that), TrimPath, and more. The way it works is simple. You setup the data that you will be able to access in the template: < Read the rest…

Posted by Dion Almaer at 7:29 am
12 Comments

++---
2.7 rating from 23 votes

Friday, September 12th, 2008

blink at the marquee one more time

Category: JavaScript, jQuery

Remy Sharp gives us a blast form the past for the some Friday fun. First, he shows his Marquee plugin that gives you the marquee effect. Why would you do this when the marquee tag itself is widely adopted? Funnily enough, the marquee tag is pretty well supported amongst the browser, but the actual effect Read the rest…

Posted by Dion Almaer at 5:32 am
4 Comments

++---
2.6 rating from 49 votes

Wednesday, September 10th, 2008

A JavaScript Ode to the Large Hadron Collider

Category: Canvas, JavaScript

Jacob Seidelin has honoured the folks at CERN who will be “pushing the button tomorrow morning to fire up the Large Hadron Collider, the largest particle accelerator ever built” by creating a perfect simulation of what is going on. Try not to destroy the world as you play with it.

Posted by Dion Almaer at 6:19 am
6 Comments

+++--
3.5 rating from 24 votes

Monday, September 8th, 2008

Resig on JavaScript Benchmark Quality

Category: JavaScript

It’s truly amazing how the release of Chrome has ratcheted up the focus on JavaScript and its performance. It’s not to say that JavaScript performance wasn’t important before but with Google coming out claiming amazing speed improvements via V8, it’s really gotten the community focused on determining how to best measure these claims. John Resig, Read the rest…

Posted by Rey Bango at 9:20 am
2 Comments

+++--
3.8 rating from 22 votes

UUID Generator in JavaScript

Category: JavaScript

Robert Kieffer didn’t like any UUID generators out there, so decided to create a lightweight randomUUID.js script. It creates RFC 4122-compliant ids: The practice is probably a little different. The uniqueness depends on how random the numbers generated by Math.random() are. Generating truly random numbers is a notoriously tricky problem, solved in different (imperfect) ways Read the rest…

Posted by Dion Almaer at 8:52 am
3 Comments

+++--
3.2 rating from 30 votes

Friday, September 5th, 2008

The JavaScript Framework Long Tail

Category: Framework, JavaScript

One of the reasons Dion is such an effective editor here at Ajaxian is his sense for filtering all of the available news from the Ajax community down to about three stories a day. Truth-be-told, with all the submissions we get and what we find on our own, we could easily post 10 stories a Read the rest…

Posted by Ben Galbraith at 9:00 am
20 Comments

+++--
3.6 rating from 38 votes

Cappuccino and Objective-J released as opensource

Category: JavaScript

We were all very impressed with the work that the 280 North team did with 280 Slides, and they fulfilled their promise by opensourcing Cappuccino and Objective-J under LGPL: Cappuccino is an open source application framework for developing applications that look and feel like the desktop software users are familiar with. Cappuccino is built on Read the rest…

Posted by Dion Almaer at 7:19 am
10 Comments

+++--
3.8 rating from 29 votes

Wednesday, September 3rd, 2008

Brendan discusses how TraceMonkey is climbing faster; Ruby on the Web with V8

Category: JavaScript, Performance

Brendan Eich jumped right in and benchmarked the tip of tree for TraceMonkey, with the V8 version that came with Google Chrome: We win on the bit-banging, string, and regular expression benchmarks. We are around 4x faster at the SunSpider micro-benchmarks than V8. This graph does show V8 cleaning our clock on a couple of Read the rest…

Posted by Dion Almaer at 1:19 pm
2 Comments

+++--
3.8 rating from 16 votes

Drag and drop via sneaky Textarea hack

Category: Canvas, JavaScript

Ernest Delgado put together work from an earlier project, and the realization that textareas are native drop targets, to create Drag and Drop without Drag and Drop. Something that I never realized before is that text areas are drop targets by default. Using this property alone (without registering drag events on the source elements), we Read the rest…

Posted by Dion Almaer at 7:02 am
8 Comments

+++--
3.3 rating from 27 votes

QUnit: A simple look at the jQuery unit test framework

Category: JavaScript, jQuery, Testing

Chad Myers has a simple look at GUnit, the jQuery based unit test framework. His article explains how to get going, and walks through a test like this: < View plain text > javascript module("Show and Hide");   test("should hide the element when hide is called", function(){       $("#testDiv").hide();       // Read the rest…

Posted by Dion Almaer at 5:12 am
2 Comments

++++-
4 rating from 19 votes

Tuesday, September 2nd, 2008

toStaticHTML: Sanitize your HTML in IE 8

Category: IE, JavaScript

The IE 8 beta has a new method, toStaticHTML that sanitizes HTML strings by removing dHTML elements and attributes from an HTML fragment. The example they give is: < View plain text > HTML <script type="text/javascript"> function sanitize() {     var szInput = myDiv.innerHTML;     var szStaticHTML = toStaticHTML(szInput);     ResultComment = Read the rest…

Posted by Dion Almaer at 7:51 am
19 Comments

+++--
3.8 rating from 12 votes

addSizes.js: automatic link file-size generation

Category: JavaScript, jQuery, Tip

Nathalie Downe has taken Simon Willison’s json-head App Engine mini-service and used it to create addSizes.js, a little script that looks for large files linked from a page, and automatically adds their file size to the copy after the link. Once in place, you simple do your usual link, and asynchronously the Web page will Read the rest…

Posted by Dion Almaer at 5:07 am
8 Comments

++++-
4 rating from 21 votes

Friday, August 29th, 2008

qooxdoo 0.8: new GUI toolkit and tool chain

Category: JavaScript, Library

qooxdoo 0.8 has been released and it appears to have a lot of big changes. Andreas Ecker told us a little about it: While at first qooxdoo 0.8 looks like a minor jump in version number over the previous 0.7.3, the actual changes are huge. In particular the UI capabilities as well as the developer Read the rest…

Posted by Dion Almaer at 10:40 am
7 Comments

++++-
4.6 rating from 40 votes

Degrading script tags for fun and profit

Category: JavaScript, jQuery

John Resig posted on degrading script tags and adding functionality to <script> so you can add a src attribute and a body of code that will be executed one the external script loaded error free: < View plain text > javascript <script src="some-lib.js">   var foo = use_some_lib();   foo.do.stuff(); </script> To make this all Read the rest…

Posted by Dion Almaer at 8:26 am
3 Comments

+++--
3 rating from 21 votes