JavaScript


Thursday, October 9th, 2008

An Interesting Twist on a Pastebin

Category: JavaScript, jQuery

Pastebins have become an important part of sharing code with colleagues. Sites such as Pastebin & Pastie.org are extremely popular because they’re easy to use and very effective in letting people compare notes on source code, especially in a support setting. Remy Sharp wanted to take the pastebin concept a step further, past the static Read the rest…

Posted by Rey Bango at 10:52 am
5 Comments

+++--
3.7 rating from 24 votes

How does the scoping work with eval()?

Category: JavaScript

Rakesh Pai wanted to understand scope issues with eval and found a few surprises. He started with the snippet: < View plain text > javascript var foo = 123; var bar = {     changeFoo: function() {         // We’ll keep changing the following snippet         alert(this);   Read the rest…

Posted by Dion Almaer at 10:32 am
3 Comments

+++--
3.2 rating from 20 votes

Wednesday, October 8th, 2008

Extreme JavaScript Performance; John Resig on Ars

Category: JavaScript, Performance

Ars Technica has a new columnist, John Resig. His first piece is on Extreme JavaScript Performance which has started to come to us in abundance recently! His article focuses on the latest updates to the fish, SquirrelFish Extreme: A popular technique that is gaining traction amongst JavaScript engine implementers is that of optimizing the engine, Read the rest…

Posted by Dion Almaer at 4:17 am
4 Comments

+++--
3.8 rating from 32 votes

Tuesday, October 7th, 2008

Regex performance in modern JSVMs

Category: JavaScript, Performance

Based on its performance on the regexes it does handle, WREC (WebKit Regular Expression Compiler) is indeed an awesome design. regexp-dna.js, however, is flawed and exaggerates SFX performance. We could use nanojit to make a regex compiler for SpiderMonkey that would perform as well as WREC. But I don’t know if it’s worthwhile yet. Regex Read the rest…

Posted by Dion Almaer at 5:57 am
Comment here

+++--
3.9 rating from 12 votes

Monday, October 6th, 2008

js.io: client library for networking

Category: Comet, JavaScript, Library

Michael Carter et al have been working on js.io, a client library that gives you networking, including Comet like support, via JavaScript. The low level work can sit upon Comet APIs, and in the future, Web Sockets, and you get high level APIs to protocols such as: amqp imap irc ldap smtp ssh stomp telnet Read the rest…

Posted by Dion Almaer at 7:01 am
4 Comments

++++-
4.3 rating from 28 votes

Friday, October 3rd, 2008

Thinking about the difference between frameworks

Category: JavaScript, Library

I got to meet Aaron Newton at The Ajax Experience, and he is a thinker. He was really taking in the various talks, and interactions, and you could tell that he was trying to work out various angles on the frameworks. What makes them different? What makes them popular? Where are they going? He wrote Read the rest…

Posted by Dion Almaer at 10:20 am
71 Comments

+++--
3.6 rating from 77 votes

Practical Functional JavaScript

Category: JavaScript, The Ajax Experience

Oliver Steele gave a great talk at The Ajax Experience this week on Practical Functional JavaScript. For his talk, he ended up creating a samples application where you can run the code directly, very similar to what John Resig did in Learn JavaScript. The samples take you through JavaScript world, stopping for: Callbacks Functions Closures Read the rest…

Posted by Dion Almaer at 10:11 am
Comment here

+++--
3.4 rating from 20 votes

Wednesday, October 1st, 2008

JStORM: A New JavaScript Object-Relational Mapper

Category: Database, JavaScript

Uriel Katz wrote in to tell us that he’s burned his GearsORM framework to the ground to create the entirely new JStORM framework, announced in his blog. JStORM currently supports Google Gears, Aptana Jaxer, and Adobe AIR, but it’s still bleeding edge: no documentation yet, just code. But the feature-set is interesting: * define your Read the rest…

Posted by Ben Galbraith at 7:29 am
7 Comments

+++--
3.4 rating from 27 votes

Monday, September 29th, 2008

ZAP: Same timeline for effects across browsers

Category: JavaScript

Mikael Bergkvist was frustrated with how effects in different browsers were far from uniform. They could run around in a modern browser, and lag on old ones. In general many effects seem to be far from smooth, and we have talked about the need to have a Timer thread that you can tie into to Read the rest…

Posted by Dion Almaer at 8:43 am
1 Comment

+----
1.5 rating from 56 votes

Friday, September 26th, 2008

The cross browser addEvent resurfaces

Category: JavaScript, Library

Stephen Stchur has written great posts in the past about cross browser events, and has revisited the topic with The Ultimate addEvent function article. You get to use the function a la: < View plain text > javascript var myDiv = document.getElementById(‘myDiv’); xb.addEvent(myDiv, ‘click’, function(e) {    alert(‘The this keywords works (even in IE!): ‘ Read the rest…

Posted by Dion Almaer at 8:24 am
7 Comments

+++--
3.3 rating from 29 votes

Thursday, September 25th, 2008

Pi.js: Simple JavaScript Library

Category: JavaScript, Library

Azer Koculu has released his Pi.js framework, which is a lightweight system that includes a minimal set of modules, and the ability to use and provide plugins. By default you get: pi.env: browser detection pi.get: DOM access pi.util: Extensions to JavaScript (e.g. support currying, includes, viewport config, and more) pi.base: OO subsystem pi.element: Create and Read the rest…

Posted by Dion Almaer at 6:04 am
6 Comments

+++--
3 rating from 34 votes

Tuesday, September 23rd, 2008

BrowserHawk Lives!

Category: JavaScript

Many years ago I stumbled across the original BrowserHawk. Back then, it was primarily a way to feed information about a client’s web browser to a server-side web framework. I was impressed at the time with its ability to detect display resolution, color depth, and a variety of other data not available via HTTP headers. Read the rest…

Posted by Ben Galbraith at 7:30 am
5 Comments

+++--
3.8 rating from 43 votes

Invaders from Mars: Building a JavaScript Game

Category: Games, JavaScript

As a follow-up to our recent posting of a JavaScript Pac-Man clone, we bring you a JavaScript Space Invaders clone: Invaders from Mars. Only this time, in addition to a link to the game itself, we’ve got a link to the author’s blog (one Mark Wilcox) in which he goes into detail on the various Read the rest…

Posted by Ben Galbraith at 7:00 am
10 Comments

+++--
3.4 rating from 28 votes

Monday, September 22nd, 2008

PURE JavaScript Template Library Improves

Category: JavaScript

PURE, the JavaScript template engine, has had a major new release which includes: Auto-rendering: a new PURE method takes your HTML and your JSON data and merges them automatically. The class attribute is used to map the HTML and the data. (Read more about autoRender and its jQuery version on our Wiki). Recursive Template Call Read the rest…

Posted by Dion Almaer at 6:21 am
Comment here

+++--
3.1 rating from 36 votes

Saturday, September 20th, 2008

SquirrelFish Extreme: JIT comes to SquirrelFish with extreme results

Category: JavaScript, Performance, WebKit

While Ben and I were talking about JavaScript performance (and other things) at Web 2.0 Expo NYC, Maciej Stachowiak announced SquirrelFish Extreme, the very new and improved version that appears to do very well at SunSpider: SquirrelFish Extreme: 943.3 ms V8: 1280.6 ms TraceMonkey: 1464.6 ms What makes it so fast? SquirrelFish Extreme uses four Read the rest…

Posted by Dion Almaer at 12:09 am
13 Comments

++++-
4.4 rating from 30 votes

Wednesday, September 17th, 2008

V8 Internals by Kevin Millikin

Category: JavaScript

My favourite presentation at Google Developer Day in London yesterday was a dive into the internals of how V8 works by Kevin Millikin, an V8 engineer who has been there and done that by creating Scheme compilers :) He discussed the key implementation details of V8, including: Hidden classes Hidden class transitions Inline caching Native Read the rest…

Posted by Dion Almaer at 9:11 am
3 Comments

+++--
3.7 rating from 23 votes