Thursday, January 22nd, 2009

Having fun in the Ajax Playground

Category: Google, JavaScript, Showcase

Ben Lisbakken, a chap who I had the pleasure to work with at Google, has done a really nice job creating a Google Ajax API Playground, an area that allows you to touch and feel the APIs in real-time: Ben said: The AJAX API Playground is currently loaded with over 170 samples for 8 Google Read the rest…

Posted by Dion Almaer at 9:12 am

4 rating from 26 votes

JsMemcached.js: JavaScript Jaxer Client

Category: Aptana, JavaScript

Rakesh Pai has created a Jaxer JavaScript client for Memcached. Once you load the file you simple configure the main object (change the file rather than calling .config(…) which would make more sense): < View plain text > javascript JsMemcached.set("keyName", "Value here, as long as you want");   JsMemcached.get("keyName");   JsMemcached.close(); // no open() as Read the rest…

Posted by Dion Almaer at 4:08 am

2.8 rating from 26 votes

Wednesday, January 21st, 2009

JavaScript Behavior Sheet

Category: JavaScript

Bertrand Le Roy of Microsoft is experimenting with JavaScript Behavior Sheets, a way to separate styling, markup, and behaviour. He has created a notion of a behaviour file that uses CSS to tie in the behaviour: < View plain text > HTML <script type="text/behavior" src="BehaviorSheet.jss"></script> The experiment uses a JSON object for now (e.g. the Read the rest…

Posted by Dion Almaer at 7:37 am

3.2 rating from 25 votes

Tuesday, January 20th, 2009

How global is your JavaScript?

Category: JavaScript, Library

Mats Bryntse “had an idea about checking the most popular javascript frameworks & APIs to see how they differ in terms of global namespace pollution. This page loads all the frameworks separately in an iframe and compares the window object against the one of a fresh iframe. I also included information about which builtin JavaScript Read the rest…

Posted by Dion Almaer at 8:33 am

4.3 rating from 40 votes

Seed the desktop world with lots of JavaScript

Category: JavaScript

< View plain text > javascript #!/usr/bin/env seed   // Import libraries that are used by the program Seed.import_namespace("Gtk");   // Initialize GTK+ Gtk.init(null, null);   // Create the main application window and set the title var window = new Gtk.Window({title: "Hello World"}); // Make the program terminate when the window is closed window.signal.hide.connect(Gtk.main_quit);   Read the rest…

Posted by Dion Almaer at 6:12 am

3.9 rating from 18 votes

Friday, January 16th, 2009

XUI: A JavaScript Library for Mobile Devices

Category: JavaScript, Mobile

Brian Leroux and some of the PhoneGap team have created XUI, a JavaScript library aimed at mobile development. Why? We hear your words. Why another JavaScript framework?! When development of PhoneGap was under way we noticed slow load times for modern JavaScript frameworks (such as Prototype, MooTools, YUI, Ext and (yes) even jQuery. A big Read the rest…

Posted by Dion Almaer at 6:10 am

4 rating from 21 votes

Wednesday, January 14th, 2009

Looping through your items without waiting around

Category: Articles, JavaScript

Nicholas C. Zakas has taken his long running script post and is now flushing out ways to stop this from happening. His first post details loops and he offers up a solution to take the synchronicity out of the world: The secret to unraveling this problem is to evaluate the loop to answer two questions: Read the rest…

Posted by Dion Almaer at 5:55 am

3.3 rating from 13 votes

Monday, January 12th, 2009

Forcing a UI redraw from JavaScript

Category: JavaScript, Tip

Thomas Fuchs has run into those annoying times when a redraw is required to irk the browser into a correct layout, and his weapon of choice is: < View plain text > javascript Element.addMethods({   redraw: function(element){     element = $(element);     var n = document.createTextNode(‘ ‘);     element.appendChild(n);     (function(){n.parentNode.removeChild(n)}).defer(); Read the rest…

Posted by Dion Almaer at 1:45 pm

3.7 rating from 23 votes

jsCron: Schedule code to run via simple JavaScript

Category: JavaScript, Library

Andrés Nieto has created a fun little JavaScript utility jsCron that lets you schedule JavaScript functions to run at certain times. You would use it like this: < View plain text > javascript // Función hola(); function hola() {    alert("Hola"); }   // Tarea programada jsCron.set("35 17 * * * hola()"); Of course, when Read the rest…

Posted by Dion Almaer at 6:28 am

3.4 rating from 37 votes

isArray: Why is it so bloody hard to get right?

Category: JavaScript

< View plain text > javascript typeof maybeArray == "Array"; // erm, are you kidding?   maybeArray instanceof Array; // maybe   maybeArray.constructor == Array; // maybe   typeof maybeArray.sort == ‘function’; // closer === ‘[object Array]’; // ding ding ding A newcomer to JavaScript would assume that there is a simple way Read the rest…

Posted by Dion Almaer at 5:12 am

3.6 rating from 27 votes

Tuesday, January 6th, 2009

QEvent: Small, Portable Event Library

Category: JavaScript, Library

Daniel Steigerwald told us about his labor of love: QEvent, a “powerful tiny extensible standalone event library”. He provides this laundry-list of features: * lightweight footprint * no namespace pollution – everything is wrapped in obj.$QEvent * normalizes the DOM event model * work also with Javascript objects * fixes common IE bugs including: all Read the rest…

Posted by Ben Galbraith at 10:45 am

3.4 rating from 19 votes

What Causes the Long-Running Script Warning?

Category: Browsers, JavaScript, Performance

Nicholas Zakas decided to dive deep on everyone’s favorite sign that you’ve done something wrong: Few web developers truly understand what triggers the long-running script dialog in various browsers, including myself. So I decided to sit down and figure out under what circumstances you’ll see this dialog. There are basically two different ways of determining Read the rest…

Posted by Ben Galbraith at 10:33 am
1 Comment

4.3 rating from 27 votes

Monday, December 29th, 2008

mod_v8: Another Server Side JavaScript

Category: JavaScript, Server

Paul Querna wrote a fun little Apache module called mod_v8 that offers a proof of concept of Yet Another Server Side JavaScript: After using Rhino for server side javascript at work, I can say I somewhat like server side javascript.  Others like Steve were already convinced a long time ago. However, I don’t really like Read the rest…

Posted by Dion Almaer at 6:07 am

3.8 rating from 17 votes

Wednesday, December 24th, 2008

Playing with a fuzzy monkey; Helping JITs improve

Category: JavaScript

for (var i = 0; i < 0x02000000; ++i) { d = 0x55555555; d++; d++; d++; d++; d++; } [/javascript] This code runs 250 times faster when the JIT is enabled in a Firefox with TraceMonkey available. This is just one minor thing that Jesse Ruderman has been able to find as he helps out Read the rest…

Posted by Dion Almaer at 5:29 am
1 Comment

3.5 rating from 10 votes

Tuesday, December 23rd, 2008

Qooxdoo 0.8.1 and Playground

Category: JavaScript, Qooxdoo

Following close up on the 0.8 release, the Qooxdoo team wrote in to let us know about their new 0.8.1 release: It’s a maintenance and bug fix release, with 250+ bugs fixed, but also some interesting novelties especially on the tooling and application side. Among the interesting changes is a first step towards a new Read the rest…

Posted by Ben Galbraith at 10:44 am
1 Comment

3.6 rating from 36 votes

Lengthening Out URLs

Category: JavaScript, JSON, Usability, Utility

In our age of information and technology, there isn’t as much mystery as there used to be. In that sense, short URLs (e.g., can be fun! Who knows where you’ll wind up. Some folks aren’t as happy with uncertainty in hyperlinking; one of them, Darragh Curran, wrote in to tell us about his project: Read the rest…

Posted by Ben Galbraith at 10:22 am

4 rating from 36 votes