500 posts from: Ajaxian
The Node.js now running on webOS and more Web improvements
(Indexed 2010-09-03):
By Dion AlmaerwebOS 2.0 SDK has just launched, and it has node.js built in (and more). The following is taken from my personal blogAt our last Palm Developer Day, Ben and I discussed future APIs for webOS including “JavaScript services” as a way to write code that runs on the other side of the device [...]
The Quick & Easy Way of Getting into YUI: SimpleYUI
(Indexed 2010-09-03):
The Yahoo! YUI is an incredibly feature-rich JavaScript library with a LOT of functionality but getting your head around all of those features can be tough. The YUI team wants to help developers get up and running more quickly and announced yesterday the release of SimpleYUI; a basic and more streamlined version of the YUI [...]
Raphal 1.5 Released
(Indexed 2010-08-31):
Dmitry Baranovskiy and team have released another version of Raphal, an excellent drawing and animation library backed by SVG (VML on Internet Explorer). New features in Raphal 1.5 include custom attributes and keyframes. Keyframes can be defined similar to CSS3 Animations:PLAIN TEXTJAVASCRIPT:el.animate({ "20%": {cy: 200, easing: ">"}, "40%": {cy: 100}, "60%": {cy: [...]
New SVG Web Release: Owlephant
(Indexed 2010-08-30):
The SVG Web team has announced a new release. SVG Web is a drop in JavaScript library that makes it easy to display SVG graphics on Internet Explorer 6, 7, and 8 using Flash.The new SVG Web release, like all of their releases, is named after especially silly D&D monsters. The new release is code [...]
How to Drag Out Files Like Gmail
(Indexed 2010-08-26):
Ryan Seddon, aka the CSS Ninja, has a nice blog post up where he reverse engineers the new feature in Gmail where you can drag attachments from an email on to your desktop.Note that the feature only currently works in Chrome.Ryan begins with the following code:PLAIN TEXTJAVASCRIPT:var file = document.getElementById("dragout");file.addEventList...(truncated)... evt.dataTransfer.setData("DownloadURL",fileDetails);...(truncated)... the code Ryan says:From [...]
Real World Canvas Tips from Hakim El Hattab
(Indexed 2010-08-25):
From Hakim El Hattab (who has some very nifty HTML5 experiments up) comes some nice tips on using the Canvas tag: Cross browser implementationThere are no real discrepancies between the canvas outputs of different browsers so long as the JavaScript code is written correctly (if not, browsers tend to try and fix things for you, [...]
Motorola Purchases 280 North
(Indexed 2010-08-24):
I don’t usually post acquisition news on here, but I just wanted to congratulate 280 North, who we’ve covered on here many times and are fellow members of the Ajax community. 280 North produces the awesome Cappuccino language/framework, including the 280 Slides presentation web application. Techcrunch is reporting that Motorola has bought 280 North. From [...]
Blow Things Up!
(Indexed 2010-08-24):
Jonas Wagner has ported the Flash 2D physics engine Box2DFlash to JavaScript:In his demo Jonas uses the Canvas tag to map the physics simulations on. Click on it to create explosions:Jonas talks about the approach he used to convert the original library from ActionScript to JavaScript:At first I thought this conversion would be trivial as [...]
The CSS3 Song
(Indexed 2010-08-23):
Don’t be bummed it’s Monday, ‘cuse the CSS3 Song is here to cheer you up:How can you go wrong with lyrics like this:CSS3Web animation done properlyCSS3Degrading gracefullyI had a dream, an awesome dreamPeople surfing in the parkOn Windows, Linux and MacAnd their page load speeds were oh-so-highNo big JavaScript libraryJust to show some eye-candyCSS3Web animation [...]
Want to pack JS and CSS really well? Convert it to a PNG and unpack it via Canvas
(Indexed 2010-08-22):
Jacob Seidelin of nihilogic fame (remember his Super Mario in JavaScript solution) is one of my unsung heroes of JavaScript. His solutions have that Dean Edwards "genius bordering on the bat-sh*t-crazy" touch that make you shake your head in disbelief when they come out but later on become very interesting. One of his posts from [...]
Attack of the IE Conditional Comment
(Indexed 2010-08-20):
Just in time for Friday, James Padolsey wins the award for most creative Internet Explorer detection code:PLAIN TEXTJAVASCRIPT:// ----------------------------------------------------------// If you're not in IE (or IE version is less than 5) then:// ie === undefined// If you're in IE (>5) then you can determine which version:// ie === 7; // IE7// Thus, to [...]
When does JavaScript trigger reflows and rendering?
(Indexed 2010-08-18):
Thomas Fuchs has some good performance things to say reflows and rendering. A video of wikipedia gives you an idea of how much happens when a basic page is rendered: The advice?The important thing is to always remember that reflowing and rendering HTML is the single most expensive operation browsers do. If your page feels [...]
JavaScript Gameboy Emulator: Memory and GPU
(Indexed 2010-08-18):
Jack Vaughn posted on Ajaxian recently about a new blog series on building a Gameboy emulator using JavaScript. Now Parts II and III have been posted in the series:Part 1: The CPUPart 2: MemoryPart 3: GPU TimingsIn the Memory section, Imran Nazar builds up a JavaScript MMU that can interpret the different parts of the [...]
How to Become a JavaScript Bad Shut Yo Mouth!
(Indexed 2010-08-17):
[Image CC-A by Terry Johnston]A fun post for a Tuesday morning, Aaron Newton shares his path to becoming a JavaScript ninja, and how you can too. Some of his tips (I encourage you to read the whole article):Study design and designers. Im not saying you have to have the talent to be an awesome graphic [...]
Free talk at Yahoo on the 27th about the software revolution that is JavaScript
(Indexed 2010-08-11):
Yahoo invites to their campus in Sunnyvale, California on the 27th of August to hear Douglas Crockford talk about “Loopage”. In his own words:Software development is hampered by a specific set of design mistakes that were made in the first programming languages and repeated in everything that has been done since. And, somewhat miraculously, JavaScript [...]
What Can You Build in 1k of JS?
(Indexed 2010-08-06):
Here’s a fun way to end the week. Peter van der Zee has cranked up a cool contest where you’ll be judged on what you can build using just 1k of JavaScript. The rules are simple:Create a fancy pancy Javascript demoSubmissions may be up to 1k. (And not crash)Externals are strictly forbidden, unlike “some” contests. [...]
Canto.js: An Improved Canvas API
(Indexed 2010-07-29):
Javascript author extraordinaire David Flanagan released Canto.js recently, a lightweight wrapper API for canvas, introduced here and documented at the top of the source code. Example:PLAIN TEXTJAVASCRIPT:canto("canvas_id").moveTo(100,100...(truncated)... three things: canto() returns an abstraction of the canvas - a "Canto" object. As with jQuery and similar libraries, there's method chaining; each method called on a Canto [...]
Looking at JS emulator core for GameBoy
(Indexed 2010-07-25):
JavaScript as a general-purpose “Turing-complete language” is illustrated – the example discussed in the first part of a series: How a CPU can be emulated through JS, and how one might start building an emulation core for the GameBoy console. Looking forward: How a game image can be loaded into the emulator over the Web. [...]
Dojo 1.5 is Out and its Feature Packed!
(Indexed 2010-07-22):
The Dojo project continues to pump out goodness announcing version 1.5 of the Dojo Toolkit with a number of new and exciting features. Dylan Schiemann had this to say about the release:The JavaScript world is evolving at an intense pace. We’re very pleased with this release of Dojo, which offers the stability needed for existing [...]
Quilt: Stitching Your JavaScript Modules Together
(Indexed 2010-07-13):
It floors me what young, talented developers are building these days. Kit Goncharov, who only recently turned 17, just cranked out Quilt, a JavaScript preprocessor written in JavaScript. Quilt is very similar to the Sprockets JS preprocessor in that it allows you to improve code organization by logically separating your code into multiple modules within [...]
Ben and Dion Step Down as Editors of Ajaxian.com
(Indexed 2010-07-07):
In the spring of 2005, the two of us gave our first Ajax talk together. The subject of the talk was DHTML, but Jesse James Garrett had just coined “Ajax” a few days previous, so we sprinkled the term throughout the slide deck. We needed a place to put some source code that accompanied the [...]
Keep your vows; Keeping wed to Node
(Indexed 2010-07-01):
Vows can be a beautiful thing. Alexis Sellier of LESS fame, is becoming an open source star. This time around he brings us Vows an asynchronous-friendly behavior driven development framework for Node.js.Write you BBD specs like this:PLAIN TEXTJAVASCRIPT:// division-by-zero-test.jsvar vows = require('vows'), assert = require('assert');// Create a Test Suitevows.describe('Division by Zero').addBatch({ 'when dividing [...]
The death of the pixel as we know it; The new DPI web
(Indexed 2010-06-30):
The Web used to be so simple. Browser request goes to server, where you do some work, and return some HTML. Then we got Ajax and finally web apps could have some semblance of UI responsiveness. Now we have richer HTML5 technologies to change expectations of our users once again.The Web is getting some new [...]
How Custom Events Will Save Us All
(Indexed 2010-06-25):
I am a big fan of both Andrew Dupont, and custom events.In his presentation he goes through some very nice use cases. Some are cross cutting (e.g. the fact that you can unit test, or debug, or ... so much easier) and some are specific such as:Scripty2 animation heartbeatPLAIN TEXTJAVASCRIPT:// keep the heartbeat goingsetTimeout(function() { [...]
Drag and drop is a gateway drug with DragDealer
(Indexed 2010-06-22):
DragDealer is a fine new JavaScript component that abstracts both touch and point interfaces.It makes life easy to do sliders and the like:PLAIN TEXTHTML:<div id="my-slider" class="dragdealer"> <div class="red-bar handle">drag me</div></div><script>new Dragdealer('simple-slider');</script> But, it can do so much more. Most of the power comes from tying functions into the drag movements. A good example [...]
Studying perceived performance of Firefox and Chrome
(Indexed 2010-06-21):
A man’s got to do what a man’s got to do. said the cowboy John Wayne. Mozilla’s new intern with the same name knows that Mozilla needs to do… and it needs to do performance. It isn’t just about JavaScript performance though, the battle for the hearts and minds is perceived performance. This is a [...]
Do LESS with Less.js
(Indexed 2010-06-20):
Dmitry Fadeyev has a great writeup of less.js, the implementation of the LESS styling language in JavaScript itself.Traditionally you would write a less file such as:PLAIN TEXTCSS:@brand-color: #3879BD;.rounded(@radius: 3px) { -webkit-border-radius: @radius; -moz-border-radius: @radius; border-radius: @radius;}#header { .rounded(5px); a { color: @brand-color; ...(truncated)...
The march to a more client-centric Web; Will the mobile Web, HTML5, and Chrome Web Apps be the tipping point?
(Indexed 2010-06-17):
Progressive enhancement.Disconnected offline applications.There is a tension brewing in how we deliver applications on the Web. This isn’t a new tension. It has been around ever since we started to do more than just throw HTML down the pipe for the hypertext document runtime to render.With the Ajax revolution we talked a lot about “Web [...]
JSKB: JavaScript Knowledge Base. Shrinking your code via BrowserScope and Caja
(Indexed 2010-06-16):
We have a screwed up tensions on the Web. The size of your source code really matters for performance. The larger your .js.... the longer it takes it to get down the pipe. This has a perverse incentive to write terse uncommented code. Add to this the problem of having to work cross browser, and [...]
Y.preload: load before execution
(Indexed 2010-06-15):
Caridy Patino has posted on a new YUI3 module for preloading of content, implementing Stoyan's ideas.You can now strap on some preloading goodness to your YUI application:PLAIN TEXTJAVASCRIPT:YUI({ //Last Gallery Build of this module gallery: 'gallery-2010.05.05-19-39'}).use('gallery-preload', function(Y) { Y.preload ([ 'http://tools.w3clubs.com/pagr2/1.sleep.expires.png', 'http://tools.w3clubs.c...(truncated)...
animateWithCSS: Azas jQuery Plugin
(Indexed 2010-06-14):
PLAIN TEXTJAVASCRIPT:// Makes all paragraph elements grow a border and then atrophy away.$("p").animateWithCSS( {border: "5px solid #555"}, // CSS properties to animate 1000, // Duration in ms "cubic-bezier", // The timing function function() { // Callback [...]
Connect: Great middleware for Node!
(Indexed 2010-06-11):
Tim Caswell has been doing awesome work, and his latest project is Connect, a high performance middleware framework for node.js. Ruby has Rack. Python has WSGI. Java has Servlets. Now, JavaScript has Node/Connect.I was able to set it up in minutes and took the following screencast of a sample application in action:Take a peak [...]
Liquid Particles
(Indexed 2010-06-11):
Sit back and enjoy:The bulk of the code is just:PLAIN TEXTJAVASCRIPT:function run(){ ctx.globalCompositeOperation = "source-over"; ctx.fillStyle = "rgba(8,8,12,.65)"; ctx.fillRect( 0 , 0 , canvasW , canvasH ); ctx.globalCompositeOperation = "lighter"; mouseVX = mouseX - prevMouseX; [...]
CSS calc() in the house
(Indexed 2010-06-10):
Finally. Don't make me jump to JavaScript to tweak the CSS when I want a relative calculation for a value.The effervescent Paul Rouget shows us the CSS calc() goodness that has a bug going for Mozilla.Some good simple use cases:PLAIN TEXTCSS:/** Two divs aligned, split up by a 1em margin*/#a { width:75%; margin-right: 1em;}#b { [...]
HTML5: Deja Vu on Ajax
(Indexed 2010-06-09):
What does Open Web mean?What does Ajax mean? Is it AJAX or Ajax?Remember those discussions? We had the arguments … the purists who would shout and scream if you said something was Ajax and didn’t use XHR with async mode + XML as the format. Ajax beat our AJAX and became the new term for [...]
A/B testing your Cohorts with Google Analytics result views
(Indexed 2010-06-08):
PLAIN TEXTJAVASCRIPT:var header_test = new Cohorts.Test({ name: 'big_vs_small_header', sample: 1, // we want to include all visitors in the test cohorts: { big: { onChosen: function() { $('#big').show(); } [...]
Realtime ray tracing^H^H^H^H^H^H texture mapping with JavaScript
(Indexed 2010-06-03):
We have posted about ray tracing before, and now we have another example by Jonas Wagner:The environment is mapped using cube mapping. I store all the values of the cubemap as floats. I increase the definition range by multiplying all values bigger than 0.95 with 2. This makes sure that the bright parts of the [...]
Stomple: Stomping to the server via WebSockets
(Indexed 2010-06-02):
Karl Krukow has created Stomple, a library that "enables using the browser as a reliable messaging client, e.g. for JMS." It is trivially simple to now have a browser (that supports this new WebSockets world) to join in with JMS backends, and start to consume.To get going it is as simple as:PLAIN TEXTJAVASCRIPT:var client = [...]
Two JS solutions to run SQL-like statements on Arrays and Objects
(Indexed 2010-06-01):
Thomas Frank released SQLike a script that allows you to filter arrays and objects in JavaScript with a SQL-like syntax. Query:PLAIN TEXTJAVASCRIPT:SQLike.q( { Select: ['firstName','|count|','firstName','|sum&...(truncated)... From: dataArray, GroupBy: ['firstName'], Having: function(){return this.count_firstName>1}, ...(truncated)...
1 + + + + + 1. Binary solo? WTFJS!
(Indexed 2010-05-31):
PLAIN TEXTJAVASCRIPT:1 + + 1 // => 21 + - + 1 // => 01 + - + - + 1 // => 21 + - + - + - + 1 // => 01 + - + + + [...]
Amazing Audio API JavaScript Demos
(Indexed 2010-05-28):
David Humphrey and the hit squad of audio gurus have some new amazing demos for us. Perfect for a Friday. This is all through the rich Mozilla Audio API work which will hopefully be pushed into other browsers at some point in the not so distant future.Charles Cliffe has some awesome WebGL visualizations from Audio. [...]
Chrome supporting EventSource for server push, and richer Worker API
(Indexed 2010-05-27):
Rick Waldron has been delving into Chrome and Chromium to find some nice updates.First, he uncovers new support for the EventSource API that allows for simple server push of DOM events as shown in this simple client and server pairing:PLAIN TEXTJAVASCRIPT:document.addEventListener('DOMContentLoaded', function () { var eventSrc = new EventSource('events.php'); eventSrc.addEventListener('open', function (event) { [...]
COR Blimey! Cross domain Ajax is really here
(Indexed 2010-05-26):
There is a lot of solid support for cross-domain Ajax in modern web browsers, yet most developers are still unaware of this powerful capability. Usage requires just a little bit of extra JavaScript work and a little extra server-side work to ensure that the correct headers are being sent. IE8s implementation lags a bit behind [...]
TeleHash: Real-time wire protocol for JSON
(Indexed 2010-05-21):
TeleHash is a brand new "wire protocol for exchanging JSON in a real-time and fully decentralized manner."If you are into switches and Erlang, it will look maybe a bit familiar, with entries such as:PLAIN TEXTJAVASCRIPT:// basic Telex with example command{ "_ring": 43723, ".see": ["5.6.7.8:23456", "11.22.33.44:11223"],}// Telex with example signals{ "+end": "a9993e364706816aba3e25717850c26c9cd0d89d", [...]
SoundManager2 now with HTML5 Audio
(Indexed 2010-05-21):
Scott Schiller, the best moustache-d frontend engineer around, has updated his awesome SoundManager library. The latest SoundManager 2 version now comes with free HTML5 Audio support which makes it a HTML5 Audio()-capable JavaScript Sound API, backwards-compatible via Flash fallback for MP3/MP4 formats. Existing SM2 API seamlessly uses HTML5 where supported, currently experimental; and of course... [...]
Mock Data Randomizer
(Indexed 2010-05-20):
Mike Wilcox has written about a nice little tool for folks who test their JavaScript code. The Mock Data Randomizer is fairly self-explanatory:PLAIN TEXTJAVASCRIPT:rand.sentences(6,7,7,9); // # of words in sentencesrand.real = true;rand.sentences(6,7,7,9); would generate something like:Whut koop mida miins knew eftor kind. Deys evin thaaght has plecu uthur melos. Eftor shaeld ha lift hend wath ets [...]
Golingo: a great Titanium mobile Web game, open sourced for you
(Indexed 2010-05-19):
Jacob Waller created an addictive word came in Golingo. What sets it apart?Not a single line of Objective-C written, courtesy of Titanium MobileOnly one (!) image ingame – the rest is CSS3 magicFluid gameplay thanks to CSS Transitions and AnimationsAll logic using pure, beautiful JavaScriptMultitouch draggables using iPhone Touch APILogic encapsulated using Low Pro – [...]
Projekktor: Simply Mighty Video
(Indexed 2010-05-18):
Projekktor is another JavaScript library that sits on top of the <video> tag to provide richer chrome and features, and also backwards compatibility via Flash. Once you load the shim, you can setup config and then you just have to use video:PLAIN TEXTHTML:<script type="text/javascript"> // check out all of the config params: [...]
Speech Recognition with Javascript; speechapi.com
(Indexed 2010-05-17):
Elias Majic and Spencer Lord have guest authored this post on speech recognition in JavaScript. Do you have something to share? Consider your own guest post and contact us!Recently Google's free text to speech api has made the rounds. The reverse is also possible, converting speech to text. With speechapi.com's javascript API, it is [...]
Garbage Collection in V8; For mobile and beyond
(Indexed 2010-05-13):
GC often gets a bad reputation, without getting its due credit. GC makes life so much easier for JavaScript developers in so many ways, but that benefit doesn’t come free all the time. Also, sometimes there are other activities in the system that can take up CPU time and appear as pauses. Not every pause [...]
l10n.js: JS localization library
(Indexed 2010-05-13):
Eli Grey has been doing some great work that we will be featuring here on Ajaxian. First up we have his recent l10n.js, which is a JavaScript library that enables localization through the native JavaScript method intended for it, gracefully degrading if the library is not present. As itgracefully degrades, you can make Ajax applications, [...]
OpenAjax Metadata 1.0 and the Adobe Dreamweaver Widget Browser
(Indexed 2010-05-11):
Widgets. Metadata. Tools. There were a couple of announcements around this recently.Part One: OpenAjax MetadataJon Ferraiolo of IBM has worked hard with the OpenAjax companies to produce the OpenAjax Metaedata format. Here is Jon talking about the work:OpenAjax Metadata (OAM) defines a set of industry-standard metadata for Ajax widgets and Ajax APIs that promote interoperability [...]
Apple isnt developing a Flash alternative named Gianduia
(Indexed 2010-05-10):
Apple Insider has a strong headline: Apple developing Flash alternative named Gianduia that gets you clicking.You quickly learn that Gianduia is:Not like Flash at all (e.g. not a plugin that brings a new development model to a rectangle in a browser)Old news (shown “last summer at WOWODC (World of WebObjects Developer Conference)”)a JavaScript framework.It is [...]
JavaScript asynchronous method queue chaining
(Indexed 2010-05-06):
"Guess who's back? Back again....."The JavaScript slim shady himself.... Dustin Diaz (formerly of YUI - Google, now of Twitter) has taken some time out for his busy coding at Twitter, and photography awesomeness to get back to some JS blogging.Dustin has written up a pattern that he used in Twitter @anywhere, the asynchronous method queue [...]
iPad JavaScript Shockingly Slow?
(Indexed 2010-05-06):
Douglas "My Guns Are Bigger Than Yours" Crockford sent us a pointer to Moonwatcher's post on entitled "My MacBook Pro runs JavaScript 26.7x as fast as my iPad".After Moonwatcher ran SunSpider on the iPad, he concluded:It's one thing not to be able to run Flash apps. But JavaScript performance like this effectively means the iPad [...]
Express: Sinatra for Node
(Indexed 2010-05-04):
PLAIN TEXTJAVASCRIPT: require.paths.unshift('path/to/expr...(truncated)... function(){ this.redirect('/hello/world')}) get...(truncated)... function(){ return 'Hello World'}) get('/bye/world', function(){ this.render('title.html.haml', { layout: false, locals: { title: 'Bye World' } })})&...(truncated)...
Want Web games on all things iTouch? Scripty 2.
(Indexed 2010-04-30):
Thomas Fuchs has a detailed post on building a Flash-y game with scripty2 where he walks through a memory game.Everything is shown, from game logic all the way to the smooth animations and easings:PLAIN TEXTJAVASCRIPT: // animate cards to go to new positionscards.inGroupsOf(4).each(function(group, x) { group.each( function(card, y){ flip(card, 'back.png'); card.morph('opacity:1;left:'+(x*SIZE)+'px;...(truncated)...
MooTools 1.3b1: A Slick release
(Indexed 2010-04-29):
The first beta of MooTools 1.3 has become available. The biggest feature is their new CSS selector engine. They aren't using Sizzle like some of the other boys, but instead have become Slick:Slick is our new, shiny, super fast, exhaustively tested, pure-javascript selector engine. There will probably be a dedicated Slick post in the following [...]
Telling robots about your crawl-able Ajax apps
(Indexed 2010-04-28):
Weston Ruter wants to talk to the search robots out there and tell them about the URL format for crawling Ajax apps.Google came out with a spec for doing this with hash bang URLs such as: http://shepherdinteractive.com/#!portfolio/interactive/.What if we could tell Google and others something like:PLAIN TEXTHTML: <meta name="crawlable-fragment-prefix" content="/"> and Google would grok http://shepherdinteractive.com/#/portfolio/interactive/ and convert [...]
Scrollin Scrollin Scrollin to the NextPoint
(Indexed 2010-04-26):
This is a guest post from the folks at Nextpoint. We’ve previously mentioned their pioneering use of Ajax in the legal industry and open sourcing of Growl4Rails. Here they bring us some details on their scrollable-document interface — make sure to make it to the end of the post for a link to [...]
Oni Rocket: Stratifying on the server side
(Indexed 2010-04-23):
Alexander Fritze has been working on some very interesting developments. We have talked about his Stratified JavaScript library in the past, and he has brought his model to the server with with Oni Rocket. He tells us more:Earlier this year I teamed up with my ex-Joost colleague Tom Germeau to found Oni Labs (http://www.onilabs.com/), where [...]
PHPJS: PHP Functions in JS, Now with CommonJS Packaging
(Indexed 2010-04-22):
PHPJS is an effort to bring the mammoth PHP API into the land of JS., where it can be used for web apps as well as the increasing number of Javascript applications outside the browser.The homepage explains some of the philosophy behind this project:PHP is a language with many high-level functions and while they’re not [...]
HTML5 is my Arcade. Akihabara.
(Indexed 2010-04-22):
Akihabara is a set of libraries, tools and presets to create pixelated indie-style 8/16-bit era games in Javascript. What does it consist of?Akihabara is composed of a number of libraries that use HTML5 canvas tag and some standard hooks.Gamebox module is complete and compact enough for making games: it allows multiple grouped objects moving simultaneously, [...]
Video Interviews with Top JavaScript Developers at JSConf 2010
(Indexed 2010-04-21):
At JSConf, I was fortunate enough to nab some great developers and interview them about their work. Guys like Kyle Simpson, John-David Dalton, Pete Higgins and more gave me some of their conference time to tell me about their projects and how they’re helping the JavaScript community:JSConf 2010 Organizer Chris WilliamsJeffrey Van Gogh & Matthew [...]
HTML5 and CSS3 Readiness Visualization
(Indexed 2010-04-19):
Paul Irish and Divya Manian have created a fun visualization on readiness of HTML5 and CSS3 standards in various browsers.It uses a bunch of the usual CSS cool-suspects: -webkit-gradient, -webkit-transition, -webkit-border-radius, and the like (and -moz/-o too).The added feature is.... do a mouse scroll on the page:PLAIN TEXTJAVASCRIPT: jQuery(document).bind('DOMMouseScroll mousewheel', function(e, delta) { var newval, [...]
Facebooks Javascript Speed-Up
(Indexed 2010-04-18):
(Live blogging notes.)Makinde Adeagbo is describing Facebook's Javascript performance optimisation efforts at JSConf. By 2009, it became clear something had to be done, as the trend was towards longer and longer page loads. Back in 2006, the objective had been super fast page loading: "If any page loads in under 100ms, it takes way too [...]
XMLHttpRequest Priority Proposal
(Indexed 2010-04-14):
Mike Belshe of Google Chrome and SPDY posted on a proposal for XMLHttpRequest Priority:Every performant web browser implementation today implements various heuristics for resource loading prioritization internally. The notion is simple, that loading some resources, such as images, are less performance critical than loading other resources, such asexternal style sheets. By implementing basic [...]
ECMA-262-3 in detail
(Indexed 2010-04-12):
It is quite a while I am following Dmitry A. Soshnikov posts in the javascript group but only yesterday He finally announced that his excellent work is complete!As demonstrated few days ago via JScript ES3 Implementation, there is much more to know about every single engine implementation or interpretation and sometimes the only way to [...]
SVG Web Releases The Fearsome Dracolisk
(Indexed 2010-04-12):
Over in SVG Web land we've pushed out a new release, code named Dracolisk:A Dracolisk is a truly fearsome creature, able to turn an enemy into stone with merely the gaze of the basilisk coupled with the acidic breath of a black dragon, while SVG Web is a JavaScript library which provides SVG [...]
Is there something to the crazy comma-first style?
(Indexed 2010-04-07):
I first saw real usage of “comma-first” JavaScript style via Ryan Dahl of Node.js fame.My eyes were a little scarred at first, but now we are seeing the reasoning behind it:Note how the errors pop out in the comma-first style.The object literal cases will throw, though a final trailing comma will cause errors in MSIE. [...]
Prototype 1.7 RC Sizzles
(Indexed 2010-04-05):
Andrew Dupont and the the Prototype team have announced the first RC of Prototype 1.7 which changes the selector engine to Sizzle, a new event API, has new layout/dimensions API, and more.Element#onElement#on is a new way to access the Prototype event API. It provides first-class support for event delegation and simplifies event handler removal.E.g.PLAIN TEXTJAVASCRIPT: $("messages").on("click", [...]
A very detailed look at object to primitive conversions
(Indexed 2010-04-02):
Ben Cherry continues to write nice detailed posts on JavaScript. This time he delves into the magic of Object - primitive conversions.He post has some good fodder for wtfjs as he shows details of toString, valueOf, and implicit fun. Take a simple example like population:PLAIN TEXTJAVASCRIPT: function population(country, pop) { return { [...]
Open Web Video Puzzle
(Indexed 2010-04-01):
This is a fun one. The Open Video Sliding Puzzle takes a running video (from the public videos project) cuts it up, and builds a sliding puzzle on the fly.How does it work? Why Canvas and HTML5 video of course:PLAIN TEXTJAVASCRIPT: for (var i=0;i<12;i++){ var can = document.getElementById('c'+(i+1)); [...]
jQuery one-line plugin to crash IE6
(Indexed 2010-03-31):
Malicious code that targets browsers has quite some history and it gets bizarre when you see just how easy it can be to crash a certain browser. If you remember, an input type of "crash" used to kill IE6. Now there is an interesting one line jQuery plugin to crash IE6 available:PLAIN TEXTJAVASCRIPT:/** * jQuery [...]
Dynamic lighting effects in Canvas
(Indexed 2010-03-26):
Jonas Wagner has a perfect Friday fun demo that normal mapping and phong shading in JavaScript using Canvas. Your mouse cursor becomes the light source that dynamically lights up a 3D object:Jonas discusses how his code works:The 3D effect is basically created using 2 textures. One contains the color of each pixel and the other [...]
GitHub moves network graph feature from Flash to Canvas
(Indexed 2010-03-26):
Given the current status of Canvas and the impending release of Apple's iPad (which will have no Flash support at all), I finally decided to bite the bullet and do a complete rewrite of the Network Graph in JavaScript and Canvas.This is Tom Preston-Werner of GitHub, from his recent posted about migrating the network graph [...]
MooTouch: jQTouch has a Moo-y contender
(Indexed 2010-03-24):
Jacky Nguyen was behind a new website ExpatLiving from Singapore, and as he built out a nice view for iPhone and mobile Webkit folks, he implemented MooTouch. It is still in an early stage, and is asking for input:MooTouch is a cutting-edge JavaScript framework built on top of MooTools that truly brings the experiences of [...]
Spritely: sprite and pan away
(Indexed 2010-03-22):
Spritely is a new jQuery plugin that adds sprite() and pan() to your $().The fun front page of birds is explained with simple goodness of:PLAIN TEXTJAVASCRIPT: // animate through 3 frames$('#bird').sprite({fps: 12, no_of_frames: 3}); // clicking on the screen flies a sprite to you$('#bird').sprite({fps: 12, no_of_frames: 3}).activeOnClick().active();$(...(truncated)... random movement$('#bird') ...(truncated)...
RequireJS: Asynchronous JavaScript loading
(Indexed 2010-03-18):
A certain someone was talking to me about how they find it interesting that node.js, the JavaScript server framework du jour which loves all things async, starts life with a bunch of synchronous require() calls. Now, this is actually quite fine since the startup of the server is not the issue at hand.However, if you [...]
Microsoft
(Indexed 2010-03-16):
Update: Here is a full set of release notes on the platform preview (called that as it is more of a shell than a browser.Rey Bango (Ajaxian and now Microsoft employee) will do a post that rounds up the news from MIX today where the IE9 team shared a first preview release of IE9 that [...]
Sputnik gets more tests; How compliant are the browsers?
(Indexed 2010-03-16):
The Chromium folk have posted about JavaScript conformance as they release a test runner for Sputnik, that allows you to easily run the complete test suite from within your browser:Sputnik touches all aspects of the JavaScript language defined in the 3rd edition of the ECMA-262 spec. In many ways it can be seen as a [...]
A deep dive and analysis of the JavaScript Module pattern
(Indexed 2010-03-15):
Ben Cherry has a really nice detailed analysis of the module pattern.He starts with the simple pattern that Crock-y documented back in the day..... and then goes on to discuss augmentation (loose and strict) and then deeper into some cool patterns:Cloning and InheritancePLAIN TEXTJAVASCRIPT: var MODULE_TWO = (function (old) { var my = {}, [...]
Ambilight Sample; video and canvas
(Indexed 2010-03-12):
Sergey Chikuyonok gets his Philips Ambilight foo on as he created a HTML5 video + canvas sample that mimics the TV effect.As the video runs, a snapshot is sent over to JavaScript land where colors are worked out:PLAIN TEXTJAVASCRIPT: function getMidColors(side) { var w = buffer.width, [...]
YQL Geo library all your geo needs in pure JavaScript
(Indexed 2010-03-11):
I just finished doing some talks on geo hacking (slides are available here) and how to use some of the Geo technologies Yahoo and Google provide as part of a University gig in Atlanta. As a lot of the students liked the idea of APIs like GeoPlanet and Placemaker but had a hard time getting [...]
modulr: a CommonJS module implementation in Ruby for client-side JavaScript
(Indexed 2010-03-08):
modulr is a CommonJS module implementation in Ruby for client-side JavaScriptRuby? what does that have anything to do with it? Ah, its from one of those Prototype guys isn't it.... Yup, Tobie is at it again, this time with modulr:modulr accepts a singular file as input (the program) on which is does static analysis to [...]
Friday fun: Lets translate YUI3 to jQuery
(Indexed 2010-03-05):
I just came across this wonderful Gist on gitHub:PLAIN TEXTJAVASCRIPT: var $;YUI().use('*', function(Y){ $ = Y.get; for(var p in Y) { $[p] = Y[p]; }}); // test$('body').append("boo!"); In case you want to use YUI3 but really really like jQuery syntax :) OK, it breaks the whole sandboxing idea of YUI3, but that's a small price to [...]
Color Picker: Works even in IE6
(Indexed 2010-03-04):
Works even in IE6Love that quote from the color picker over at RaphaelJS land. This plugin by Dmitry Baranovskiy gives you an easy color picker in short order:PLAIN TEXTJAVASCRIPT: var icon = Raphael("picker", 23, 23).colorPickerIcon(11, 11, 10); icon.attr({cursor: "pointer"}).node.onclick = function () { document.getElementById("benefits").style.visibility = "visible"; var out = document.getElementById...(truncated)...
Touching Cloth; Canvas Fu
(Indexed 2010-03-03):
Andrew Hoyer shows his canvas Fu with Cloth, a great experiment using nice physics.What makes this simulation special is the speed at which everything is computed. Javascript (the language this is written in) is not exactly the most efficient language for this type of computation. This being said, much time was spent squeezing out every [...]
EnhanceJS: A library to progressively enhance
(Indexed 2010-02-25):
EnhanceJS is a new library from the Filament Group, who are serious about progressive enhancement and accessibility.What is EnhanceJS?EnhanceJS is a new JavaScript framework (a single 2.5kb JavaScript file once minified/gzipped) that that automates a series of browser tests to ensure that advanced CSS and JavaScript features will render properly before theyre loaded to the [...]
I Cant Believe Its Not Flash
(Indexed 2010-02-19):
Thomas Fuchs gave a presentation titled “I Can’t Believe It’s Not Flash” at WebStock. It is often hard to grasp a presentation from slides, but this one is great fun to flip through.This one really hits home:We were surprised to see how JavaScript was NOT the bottleneck in Bespin when we first prototyped it.And, this [...]
Quicksand: transition and filtering effect
(Indexed 2010-02-18):
Jacek Galanciak has created a nice visual transition library, Quicksand, that filters and shows a set of data in an interesting way.The jQuery plugin has you quickly calling quicksand like this:PLAIN TEXTJAVASCRIPT: $('#source').quicksand( $('#destination li') ); and you have the data to transition between:PLAIN TEXTHTML: <ul id="source"> <li data-id="iphone">iPhone OS</li> <li data-id="android">Andr...(truncated)...
Harmony: Bringing together great libraries to enable awesome JS testing in Ruby
(Indexed 2010-02-17):
Martin Aumont has released Harmony, which "provides a simple DSL to execute JavaScript and DOM code within Ruby."This enables you to do very cool things such as unit test JavaScript in the same area as your Ruby tests:PLAIN TEXTRUBY:require 'test/unit'require 'harmony'class JavascriptTest <Test::Unit::TestCase def setup @page = Harmony::Page.new @page.load('public/javascripts/foo.js') end def test_foo [...]
WTFJS
(Indexed 2010-02-15):
The title need no more flushing out. Brian Leroux has created WTFJS to capture some of the rough edges of JavaScript. The stuff that made Crocky write about the Good Parts.Fun side effects such as:PLAIN TEXTJAVASCRIPT: NaN === NaN // false Number.MIN_VALUE> 0;// true? really? wtf.// It turns out that MIN_VALUE is the smallest number// GREATER THAN [...]
Faye: Bayeaux protocol Comet server for Node.js
(Indexed 2010-02-09):
James Coglan has ported a Ruby/EventMachine Comet server to offer a new Node.js server on the Bayeux protocol. The project is Faye and you can check out the code on GitHub.On the client side:PLAIN TEXTHTML: <script type="text/javascript" src="/comet.js"></script> <script type="text/javascript"> CometClient = new Faye.Client('/comet'); CometClient.connect();</script> PLAIN TEXTJAVASCRIPT: CometClient.subscribe...(truncated)...
Think You Know Javascript? Try this Quiz!
(Indexed 2010-02-09):
If you know you think you know your objects from your arrays and your null from your undefined, here's a quiz for you from Perfection Kills.I was recently reminded about Dmitry Baranovsky’s Javascript test, when N. Zakas answered and explained it in a blog post. First time I saw those questions explained was by [...]
Javascript ePub Readers
(Indexed 2010-02-09):
eBooks have gone mainstream, and right now the open ePub format is getting a lot of attention, being the iPad's book format of choice. Often overlooked in gadget-centric media is the fact that ePub is based on web standards, and therefore amenable to being rendered in the browser, sans plugins. Pure Javascript ePub readers are [...]
Romn Corts and Ajaxian make up with amazing CSS demos
(Indexed 2010-02-08):
We have been long term fans of Romn and the fantastic demos and samples that he puts together, usually involving CSS goodness. We messed up the other week though when we linked to his work on a scrolling coke can. I do these postings as a labor of love, and since Ajaxian isn't my day [...]
jsContract: Design by Contract library
(Indexed 2010-02-04):
Fan of Eiffel or the design by contract pattern that it espouses?yvind Kinsey is, and he just created jsContract an alpha library to give you some pre and post condition abilities.Here is an example:PLAIN TEXTJAVASCRIPT: function _internalMethod(a, b){ Contract.expectNumber(a); Contract.expectNumber(b); Contract.expectWhen(config.mode === "divide", b> 0, "Divisor cannot be 0"); Contract.expectWhen...(truncated)...
LunaScript: A new language and platform to take your Web 2.0 apps to the moon?
(Indexed 2010-02-02):
A Googler and a Facebooker were in a pub discussing the complexities of building out a rich modern Web application. There are a ton of dependencies, and you need to be proficient in multiple languages and tools (JavaScript, HTML, CSS, SQL/NoSQL, backend languages, build tools, etc).Well, they may not have been in a pub.... but [...]
Addmap.js automatically analyse a text for geo locations and add a map
(Indexed 2010-01-29):
As part of an upcoming article on geo location I am putting together a few Geo Toys for myself and here is the first one. Addmap.js is a JavaScript that analyses an elements text content, finds geographical locations and links them to Google Maps. It also adds a map preview and a list of the [...]
Canvas Benchmark
(Indexed 2010-01-28):
The Freeciv.net crew has benchmarked a path in their canvas game. It is one data point, and tests more than just Canvas itself because a lot of code is running in the game. Thus, it ends up testing the union of a particular JavaScript path and the rendering of the canvas.Here are the results:With Bespin [...]
JavaScript running on the GPU
(Indexed 2010-01-26):
I love programmers like Alex Miltsev. He won the Jetpack 0.5 content by prototyping access to the GPU from JavaScript!Alexs work is an alpha-prototype that shows the feasibility of the project and it requires a custom build of Firefox to use its not easy to demo. However, the code sample below shows how the [...]
De-fusing JavaScript Natives with the Fusebox
(Indexed 2010-01-22):
John-David Dalton has released Fusebox, a library that allows you to sandbox natives:Extending JavaScript natives gives you the power to customize the language to fit your needs. You can add convenience methods like "hello world".capitalize() or implement missing functionality like [1,2,3].indexOf(2) in JScript. The problem is that frameworks / libraries / third-party scripts may overwrite [...]
Jaml: An HTML builder a la Haml
(Indexed 2010-01-21):
There have been a few HTML builder APIs out there, but Ed Spencer (new lead of Ext JS) has put together something that looks and feels similar to Haml from the Ruby side.Jaml lets you write HTML like this:PLAIN TEXTJAVASCRIPT: div( h1("Some title"), p("Some exciting paragraph text"), br(), ul( li("First item"), li("Second item"), [...]
ECMAScript Edition 5: WebKit JavaScriptCore Progress
(Indexed 2010-01-19):
We have a new bible. ECMAScript Edition 5 was voted (despite annoying folk like IBM who seem to only get in the way) in. So, when do we get to play?Over on the Qt blog, Kent has posted on the progress that has been made, and what there is to go, for this to be [...]
Helium CSS: JavaScript Library to test your CSS usage
(Indexed 2010-01-18):
Geuis Teses has released an enjoyable library called Helium that has the goal of testing your stylesheets for unused style.You inject helium into your site (e.g. put it in an included footer) and then when you hit the first page you will have a popup asking for the pages you want to test. Helium will [...]
Pure CSS bar charts as a simple API
(Indexed 2010-01-15):
I am right now working on a high-traffic project that will run in a sandbox that doesn't allow me to pull third party JavaScript or use canvas/Flash. Yet I need to generate bar charts from a set of data.The solution to me was to create the charts from HTML using CSS. There have been some [...]
Gordon: Flash Runtime Implemented in Javascript
(Indexed 2010-01-13):
This was quite a surprise! Tobias Schneider has built a Flash runtime that works right in the browser. It's implemented in pure Javascript and HTML5, and the whole thing is open source, MIT-licensed, and hosted on GitHub.See Gordon in action (demos hosted by Paul Irish).It works like a charm in recent versions of Firefox, Chrome, [...]
Using YQL as a proxy for cross-domain Ajax
(Indexed 2010-01-12):
OK, this is nothing shockingly new, but I found it pretty useful. Using jQuery, Ajax has become more or less a one-liner:PLAIN TEXTJAVASCRIPT:$(document).ready(function(...(truncated)... $('.ajaxtrigger').click(function(){ $('#target').load($(this).attr('href...(truncated)... return false; });}); This loads the document any link with a class of "ajaxtrigger" points to and updates the co...(truncated)...
Progressive XMLHttpRequest
(Indexed 2010-01-12):
Kyle Scholz has brought up the topic of progressive response handling in XHR:Perhaps it's subtle, but the draft spec for XMLHttpRequest calls for support for progressive response handling: 4.7.6 The responseText attributeThe responseText attribute must return the result of running these steps: 1. If the state is not LOADING or DONE return the empty string [...]
Jison: Build parsers in JavaScript
(Indexed 2010-01-11):
If you have ever wanted to create your own "language" (or DSL if you want to play 2008 buzzword word bingo) then you may have delved into the worlds of yacc/bison (and their siblings: lex/flex) to get this done in a more declarative manner. Jison lets you play in this world thanks to Zach Carter:Jison [...]
WebAIM Study: Screenreaders and Javascript Co-Exist
(Indexed 2010-01-10):
Paul Irish points to a recent survey by WebAIM showing what high-level accessibility guidelines frequently omit to mention: screenreaders and Javascript often co-exist. The study shows between 75% and 90% of screenreader users have Javascript enabled. This isn’t just speculation, but a survey of 655 screenreader users.This response may help strengthen the notion that [...]
QBasic on Javascript
(Indexed 2010-01-10):
Steve Hanov has been busy. Following from his hand-drawn canvas app, he’s now built a working QBasic implementation powered by Canvas and Javascript and is blogging about how he did it.The most straightforward way of creating a basic compiler in javascript is to directly translate the basic into javascript functions. But this approach will not [...]
Amazing Audio Sampling in JavaScript with Firefox
(Indexed 2010-01-07):
Above shows the work of some awesome developers. Alistair MacDonald, David Humphrey, Thomas Saunders and Corban Brook have collectively done some great forward looking work with audio sampling and JavaScript. You have to use a custom build of Firefox to make it work right now, but listen to the story of how this came about. [...]
Commodore 64 JavaScript Emulator
(Indexed 2010-01-05):
Tim de Koning has done what folks do best with their winter holidays…. created something fun :)With JSC64 he has ported the Flash version to give us an emulator for the Commodore 64 in JavaScript.Tim’s work uses Canvas and he provides a jQuery plugin if you are that way inclined. It is fun to check [...]
Crockford on JavaScript: A Public Lecture Series at Yahoo!
(Indexed 2010-01-05):
Douglas Crockford showed us how JavaScript (or parts of it) could be used to do real software engineering. Now Crockford and Yahoo! are hosting a cool series of public lectures on the language we all love:Douglas Crockford is Yahoo!’s JavaScript architect and a member of the committee designing future versions of the world’s most popular [...]
GLGE
(Indexed 2010-01-04):
Not sure if the whole WebGL thing will take off? Check out the video above which shows a simple scene constructed in blender and exported to GLGE for use in a WebGL capable browser.What is GLGE?GLGE is a javascript library intended to ease the use of WebGL; which is basically a native browser JavaScript API [...]
CoffeeScript: A nice little language that compiles to JavaScript
(Indexed 2009-12-29):
Jeremy Ashkenas is experimenting with a new language that translates down to JavaScript. The language is CoffeeScript and I kinda like the syntax.Jeremy told us:I’ve been working on a little language with a Ruby/Potion-esque syntax that compiles into JavaScript. It tries to enforce “the good parts”, convert statements into expressions automatically, and adds some extra [...]
TransM: Programmable Image Transitions
(Indexed 2009-12-28):
The infamous Christian Effenberger has a new library to share:TransM.js 1.0 allows you to add programmable image transitions to your webpages. Features 113 transitions, 32 tweenings, individual corners, overlay graphics and event actions. Requires no plugin/extension or any other external resource! It uses unobtrusive javascript to keep your code clean.You can play around with an [...]
Closure Lite
(Indexed 2009-12-24):
Michael Bolin formerly of Google has created Closure Lite as a way to let developers get their feet wet in the Closure library without having to go into the compiler and the like (but they should do that eventually!).Closure Lite itself consists of the following subset of APIs:goog.arraygoog.Disposablegoog.disposegoog.domgoog.dom.D...(truncated)... is build via the closure compiler itself, [...]
Orderly JSON
(Indexed 2009-12-23):
Lloyd Hilaiel of Yahoo! BrowserPlus fame, has a little holiday gift for us. He has created a simple library called Orderly that "is a textual format for describing JSON. Orderly can be compiled into JSONSchema. It is designed to be easy to read and write."He shares:A little bit of orderly...PLAIN TEXTJAVASCRIPT: object { string name; string [...]
EtherPad Goes Open Source
(Indexed 2009-12-18):
Following their recent acquisition by Google, AppJet announced they would open source EtherPad, the collaborative, real-time, notepad. That’s now done, and you can find the project home at – surprise, surprise – Google Code.Checkout InstructionsBrowse the SourceWhat’s especially cool about this is that Etherpad is Javascript on both sides of the wire. In a new [...]
Weelya Announces Ajax Push Engine (APE) v1.0
(Indexed 2009-12-15):
The team at Weelya announced v1.0 of the Open source APE JavaScript Framework & APE Server, their comet-based push engine created to ease the client/server communication.New features in APE 1.0:New and improved communication protocol :Entirely using JSON and fully extensible.Several commands can be nested in one request.New transport methods :XHRStreaming : A single connection is [...]
Downloadify create downloads on the fly without server interaction
(Indexed 2009-12-15):
Downloadify is an interesting solution to offer files as downloads without having to create temporary files and loop through a script that sets a force-download header. As shown in the demo page offering a file for download and setting its content is as easy as this:PLAIN TEXTJAVASCRIPT:Downloadify.create('downloadify',{ filename: function(){ return document.getElementById('filename').value; }, data: function(){ [...]
MooTools Gets a Plugin Repo, Makes Finding the Right Code Easier
(Indexed 2009-12-11):
Plugins are a fact of life when it comes to JavaScript libraries. These user-contributed code snippets provide tremendous features & functionality and save developers time by not having to re-invent the wheel. The hard part, though, is trying to filter out which ones are actually useful and compatible with your current library. Finding the right [...]
W3C Capture API our in draft
(Indexed 2009-12-09):
A draft of the W3C Capture API has been put out there by the editors.The Capture API defines a JavaScript API for accessing the microphone and camera of a hosting device.When I look at the API for getting pictures from a camera I got a little scared at the amount of DOM fluff around the [...]
PhoneGap Updated to Support Palm webOS Apps
(Indexed 2009-12-08):
The PhoneGapteam announced yesterday that they've got support for Palm's webOS Mojo API. PhoneGap APIs available to Palm devices include geolocation, accelerometer, notification, orientation, sms, telephony, network, file (read only), and a limited selection of device properties (see the PhoneGap Mobile Spec running on the Palm Emulator to the left).Essentially a JavaScript shim that maps [...]
JavaScript Gaining Traction with Game Developers
(Indexed 2009-12-07):
We received an email from Joesph Huckaby about his new JS-based game rendering engine and I have to admit that when I first read about it, I was a little skeptical about it mainly because I’ve been disappointed with many that I’ve seen in the past. As I dug into his site, Effectgames.com, my whole [...]
jQuery Wins .net Magazines Open Source Application of the Year
(Indexed 2009-12-04):
Some very exciting news coming from the jQuery project yesterday. The jQuery JavaScript library won .net Magazine’s “Open source application of the Year for 2009″. This was a pretty amazing accomplishment when you consider that both WordPress & Firefox 3.5 were the runner-ups. Simon Willison was on hand to accept the award for the project. [...]
Highcharts: Really nice charting API
(Indexed 2009-12-04):
We all want better and better charting libraries. Dojo has some good stuff, Protovis is a good option, and there are many many more (put your favourite below!).The latest guy in the ring is Highcharts uses either jQuery or MooTools for some common JavaScript tasks. In addition, Internet Explorer needs ExCanvas which emulates the Canvas [...]
Google Analytics unblocks the Web w/ Async support
(Indexed 2009-12-02):
I heard a huge cheer from the Internet today and found that Google Analytics has launched async mode which finally unclogs our browsers from blocking.Steve Souders must have had the loudest cheer, and wrote up his view:The pain of loading JavaScript files is that they block the page from rendering and block other resources from [...]
TuneKit: The Web SDK to code up iTunes extras
(Indexed 2009-12-01):
PLAIN TEXTJAVASCRIPT: albumHelper.play = function (){ var t = bookletController.buildPlaylist(appData.songs);t.pla...(truncated)... (window.iTunes.platform == "Windows" || window.iTunes.platform == "Mac" || window.iTunes.platform == "Emulator") {TKNavigationController.sharedNavigation.pushController...(truncated)... that? The code from above is something you would see in an iTunes Extras experience.When Ben showed me a (admittedly poor) ...(truncated)...
Javascript JPEG Encoding
(Indexed 2009-11-25):
Andreas Ritter has managed to encode JPEGs in Javascript. This blog post explains how he did it, shows some benchmarks, and provides a demo and a downloadable library so you can play along at home.It was surprising that it was that easy to get the first js-encoded jpeg displayed in the browser. Of course I [...]
Node and Djangode Follow-Up
(Indexed 2009-11-24):
Simon Willison's Talk last week on Node generated a healthy dose of post-conference buzz, and he's followed up with a blog post on Node and his higher-level API for Node, Djangode.Nodes core APIs are pretty low levelit has HTTP client and server libraries, DNS handling, asynchronous file I/O etc, but it doesnt give you much [...]
Zen Coding: Generating HTML from selectors
(Indexed 2009-11-23):
Normally we use CSS selectors to find and tear apart HTML. Sergey Chikuyonok's jujitsu move is to do the opposite. With Zen Coding you take a CSS selector like this:PLAIN TEXTHTML: html:xt>div#header>div#logo+ul#nav...(truncated)... it generates an HTML structure like this:PLAIN TEXTHTML: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd...(truncated)... xmlns="http://www.w3.org/1999/xhtml"...(truncated)...
Full Frontal 09: Simon Willison on Server-Side Javascript and Node.js
(Indexed 2009-11-20):
Simon Willison snuck in a last-minute topic change, and is now going to give the server-side Javascript talk.The news of the past 24 hours is ChromeOS. For the first time in years, someone's re-thinking how an OS should work. With Chrome, you turn on your computer and you're in the browser. What's really interesting is [...]
Full Frontal 09: Stuart Langridge on HTML5 Features
(Indexed 2009-11-20):
Stuart Langridge introduces us to some of the up-and-coming features we're getting with current and future browsers, a nice complement to Robert Nyman's talk, which covered the advanced features of "mainstream" (IE6-compatible) Javascript. After introducing the features that are there today, he also talks about how we can deal with the browser many of us [...]
IE 9: Hardware rendering, new JS engine, CSS, standards, and more
(Indexed 2009-11-18):
With PDC going on, we get a glimpse at the early stage of IE 9. There is some promise, albeit with omissions!Dean Hachamovitch, IE general manager, gives us an early look whirlwind that discusses:Performance ProgressThe JavaScript engine team members John Montgomery, Steve Lucco and Shanku Niyogi give us an early look at the new JS [...]
Simply Buttons
(Indexed 2009-11-18):
Kevin Miller has updated his simply buttons library to use the button element. This library offers better looking and behaving buttons across all browsers. It does not need a javascript framework and is very easy to install and use.It is all the rage to build a perfect button and you can get some nice ones [...]
Persevere comes to a 1.0 release
(Indexed 2009-11-16):
Ah the magical 1.0 release. It can feel so illusive :)Kris Zyp has announced the 1.0 of his Persevere uber-server:Persevere is JavaScript storage and application server that uses standards-based interface of HTTP/REST, JSON-RPC, JSONPath, and REST Channels. Persevere is designed for rich clients application and can be used with any framework or client. The Persevere [...]
Javascript Inheritance Patterns: Learning from Closure
(Indexed 2009-11-13):
The library portion of Google's Closure not only gives us a new API to work with, but also adds another piece of mature code to the public domain, where it can be studied and scrutinized. Something we might normally have done with View Source if not for the compression techniques in effect.A new article by [...]
Evidence; that your code will work
(Indexed 2009-11-11):
Tobie Langel of Prototype fame has created another unit testing library for JavaScript. Another one I hear you say? Well, if Tobie did it.... it is worth checking out. Time to get some Evidence.I found out about it over dinner in Berlin at the great JSConf.EU. At the table were 6 people from 6 different [...]
Call for Proposals: TheServerSide Presents TheClientSide
(Indexed 2009-11-10):
Hello Ajaxians!Our sister site, TheServerSide.com, is looking for proposals for ‘TheServerSide Presents TheClientSide’ — a conference within a conference at TheServerSide Java Symposium 2010–which focuses on the needs of developers who work on distributed application client. Submit your proposals to cfptheserverside@techtarget.comAbout the event:TheServerSide presents TheClientSide will offer a broader range of client and user interface [...]
mile: Stand-alone CSS animation JavaScript mini-framework
(Indexed 2009-11-09):
I am sitting next to Thomas Fuchs at JSConf.EU and he just posted about his new library agnostic CSS animation framework called mile (named after mile Cohl, an early animator).mile has a full set of CSS properties for animation (length-based and colors) and includes easing and callbacks all with less than 50 lines of code!Check [...]
Google releases Closure, the tools behind the JS geniuses
(Indexed 2009-11-05):
I remember when the whole Ajax thing kicked in and JavaScript developers looked at Gmail, Gmaps, and the like and thought “I wonder what powers that?”Well, the power comes from Closure a library and set of tools that the great JS hackers built over time as they created the applications at scale.As soon as I [...]
Riot.js: JavaScript port of the lean fast unit test framework
(Indexed 2009-11-05):
Riot started as a lean Ruby unit test framework with tests that have a style like this:PLAIN TEXTRUBY:context "a new user" do setup { User.new } asserts("that it is not yet created") { topic.new_record? }endAlex Young has now implemented Riot.js which brings you the lean framework in a format that can run stand-along via Rhino, [...]
jQuery Bondage
(Indexed 2009-11-04):
When your browser freezes on you on some random web page, there's a pretty good chance its caused by the very JavaScript designed to improve your experience.Good 'ole JavaScript performance. Sebastian Ruiz of Atlassian recently worked on a UI rewrite of two of their products (FishEye and Crucible) and found some interesting solutions to problems [...]
A State of the Web via October Tweets
(Indexed 2009-11-02):
A lot of great news is coming in via Twitter. I make a lot of Ajax comments under @dalmaer and wanted to give you a roundup on the month of October via Tweets. Always interesting to take a glance at the month. What do you think?Firefox 3.6 beta 1 is here. Full screen video, WOFF [...]
WebSync: Comet for IIS
(Indexed 2009-10-30):
The following is a guest post. If you have something to say to the Ajaxian community, please feel free to either link us to your work, or give us a guest posting that goes into detail! Contact us.My name is Jerod Venema, and I’m excited to write to you about our new Comet server for [...]
Would you like a _ with that $? New library gives JS what it should have
(Indexed 2009-10-29):
Jeremy Ashkenas and the DocumentCloud team have just released Underscore.js a small library that provides all the functional programming helpers that you expect from Prototype.js or Ruby, but without extending any core JavaScript objects.Jeremy told us:This makes it a natural fit alongside jQuery, without having to worry about the conflicts and redundant functionality that using [...]
YUI 2.8.0 now Caja compliant
(Indexed 2009-10-29):
Caja is one of the most promising attempts to deliver secure web applications not prone to the attacks that normal JavaScript solutions sadly enough allow for. Let’s face it – the concept of global variables and the lack of sandboxed environments in addition to the fun that is browser security holes makes the web as [...]
JavaScriptMVC 2.0: Major Rewrite, Strong Test Suite Integration and Improved Documentation
(Indexed 2009-10-27):
The JavaScriptMVC team has announced v2.0, a major update & rewrite to their MVC-based JavaScript framework. The release incorporates several big changes including a rewrite of the library to leverage jQuery's functionality and style guidelines. For example, if you have a list of entries, you can organize the event handlers like:PLAIN TEXTJAVASCRIPT: $.Controller.extend("EntriesControl...(truncated)... ".entry click" : [...]
Client-Side tar and LZMA compression
(Indexed 2009-10-22):
The BrowserPlus team of Yahoo released a client-side compression API. As explained in the following screencast, the JavaScript API allows you to pack and compress files on the client with LZMA or tar. Client Side Compression from Lloyd Hilaiel on Vimeo.You can read more about the implementation or try out the live demo (requires BrowserPlus)Using [...]
Implied globals in browsers
(Indexed 2009-10-21):
Stoyan Stefanov has done some testing on so called implied globals in browsers. One of the interesting finds was that the meta description is accessible in JavaScript using object property notation on IE and other browsers.PLAIN TEXTHTML:<meta name="description" content="test me" /> PLAIN TEXTJAVASCRIPT:alert(description.content); // "test me" Furthermore, you can use document.getElementById('description') will give you that [...]
Microsoft Ajax Minifier VS YUI Compressor
(Indexed 2009-10-20):
I have discovered only yesterday the Announcing Microsoft Ajax Library (Preview 6) and the Microsoft Ajax Minifier post and using Visual Studio on daily basis I could not miss an instant minifier test.First of all, my apologizes for the wrong tweet and the comment left in the related post. I have spotted a false positive [...]
Firefox Trunk: Accelerometers, WebGL, and CSS Transitions
(Indexed 2009-10-13):
Paul Rouget shows off some cool new demos that are baking on the trunk of Firefox currently.First are some nifty new events that get fired if your computer has an accelerometer:PLAIN TEXTJAVASCRIPT:window.addEventListener("MozOrientation", function(e) {/* 3 values: e.x, e.y, e.y */}, true) It works with MacBooks and on Windows and Linux with Thinkpads.Check out this cool [...]
Fun Friday: Mullets and Space Battles
(Indexed 2009-10-09):
The week is almost over, and that means it's Fun Friday! Ajax and HTML5 aren't just for serious business apps ("business in the front, party in the back"):http://www.flickr.com/photos/heyjohngreen/ / CC BY 2.0This week we have JS Wars from Jonas Wagner:There are a couple of unique things about this game that makes it a good educational [...]
QUnit A JavaScript Unit Testing Framework
(Indexed 2009-10-01):
There are many options for JavaScript Unit Testing but a “de facto” standard for the jQuery library, related plug-ins, and jQuery UI is QUnit. Nothing new so far? Check this out:According to tweets from John Resig the state of QUnit is:QUnit is now completely standalone (it no longer depends upon jQuery)QUnit now works outside of [...]
ChemDoodle Web Components
(Indexed 2009-10-01):
Via jzornig comes news of a cool set of components written with HTML 5 and the Canvas tag:ChemDoodle Web Components are pure javascript objects derived from ChemDoodle to solve common chemistry related tasks on the web. These components are powerful, fully customizable, easy to implement, and are free under the open source GPL license.The page [...]
A note from the editors; Hat change!
(Indexed 2009-09-28):
Dear Ajaxian Community,As editors-in-chief so to speak, I always feel that it is important to fully disclose to the community any affiliation change. We have always tried to by balanced, and show that by featuring all kinds of news (for example, we haven’t been shy at posting about great WebKit tech while at Mozilla, or [...]
Content Aware Image Resizing in JavaScript
(Indexed 2009-09-24):
Content aware image resizing is a nifty technique where you can make an image smaller by literally understanding the content better and remapping it. Stphane Roucheray has put together a fancy demo (Firefox 3.5 only) that uses JavaScript and the Canvas tag plus createImageData to do all of this in the browser versus C++:For this [...]
JavaScript Liquid Image FX
(Indexed 2009-09-24):
Inspired by its conceptual simplicity, Andrea Giammarchi ( cough, the newest Ajaxian, cough ) has revisited an old ActionScript 1.0 Image effect making it lightweight, 1.2Kb minified and gzipped, and portable, thanks to its cross-browser nature and zero libraries dependencies. Last but not least, it's 100% JavaScript, and without canvas.The theory is simple: expanding a [...]
Gmail Mobile team talks Latency and Code Loading
(Indexed 2009-09-22):
Bikin Chiu of the Gmail Mobile team picks up the HTML5 series with a piece on reducing startup latency.It starts off by talking about lazily loading code via the old favorites of adding a <script> to the DOM, or XHR+eval, but then it gets beyond the typical and discusses the nuance of mobile + offline [...]
Vanadium: Semantic client side validation
(Indexed 2009-09-18):
Vanadium is a new client side validator that allows you to set semantic validation logic via the class attribute. The main page has examples such as:PLAIN TEXTHTML: <input class=":required" type="text"/><input class=":integer" type="text"/><input class=":length;4" type="text"/><input class=":min_length;4" type="text"/><input class=":format;/^(vanadium)+$/i" type="text"/><input id="pass" class=":ajax;/username_checker/check.json" type="text"/>&...(truncated)...
Talk like a Pirate day is coming! Heres a script to join the fun
(Indexed 2009-09-17):
This Saturday, the 19th of September is once again talk like a pirate day and there is a terribly easy way this year to turn your boring ol' site into a swashbuckling Piratespeak one. Simply include the following script node at the end of your body element:PLAIN TEXTXML:<script src="http://l.yimg.com/d/lib/ydn/js/pirate1252961643.js">...(truncated)... The Piratespeak translation script is powered [...]
Doloto, the JavaScript optimizer, released by Microsoft Research
(Indexed 2009-09-16):
We posted on Doloto, the Microsoft Research project to help optimize JavaScript via code splitting. Ben Livshits and his team have now released the tool:Doloto is an Ajax application optimization tool, especially useful for large and complex Web 2.0 applications that contain a lot of code, such as Bing Maps, Hotmail, etc. Doloto analyzes AJAX [...]
WAMI lets you add speech recognition to any web page
(Indexed 2009-09-15):
Andrew Sutherland is giving a presentation at The Ajax Experience tomorrow at 9:30am where he will announce the availability of WAMI (Web-Accessible Multimodal Applications).WAMI is a project out of MIT that lets you plug voice recognition directly into a javascript powered page, and optionally record+save audio files of people talking.There are a couple of great [...]
Formaldehyde: PHP debug info for the client side
(Indexed 2009-09-10):
Andrea Giammarchi has released Formaldehyde, a new Ajax and PHP error debugger.Simply grab the project and throw in an inclusion:PLAIN TEXTPHP: <?php require_once 'formaldehyde.php'; ?> You are off to the races.Want to do a touch more?PLAIN TEXTJAVASCRIPT: // *optional* custom ServerError constructorfunction ServerError(e){ for(var key in e) this[key] = e[key] ;};// make Firebug ...(truncated)...
Getting hyper about JSON namespacing
(Indexed 2009-09-09):
Kris Zyp, JSON hero, has been cooking up some more good stuff on his path to reinventing a new path to all.In JSON namespacing he discusses JSON Hyper Schema which aims to cure JSON from XML namespacing colon cancer.JSON Hyper Schemas can be referenced from instances by Link headers or media type parameters. A simple [...]
Prototype 1.6.1; Speed up, clean up, and team up
(Indexed 2009-09-08):
Congratulations to Andrew Dupont and Tobie Langel (new official co-lead of Prototype-core) on the new 1.6.1 release:Full compatibility with new browsers. This version of Prototype fully supports versions 1.0 and higher of Google Chrome, and Internet Explorer 8 in both compatibility mode and super-standards mode.Element metadata storage. Easily associate JavaScript key/value pairs with a DOM [...]
Kamaloka: AMQP implementation in JS
(Indexed 2009-09-08):
Would you like to talk messaging directly from the browser? Kamaloka is a new library that speaks AMQP. You can easily tie to Orbited but also, in theory, any other library that speaks TCPSockets.PLAIN TEXTJAVASCRIPT: Orbited.settings.port = 9000; amqp_broker_port = 7000; amqp_conn = amqp.Connection({host: 'localhost', [...]
Stratified JavaScript; Concurrency features in JavaScript
(Indexed 2009-09-04):
Alex Fritze has introduced Stratified JavaScript, an experiment that allows us to play with some concurrency features in JavaScript in a cross browser way.It features:The ability to pause execution: hold()PLAIN TEXTJAVASCRIPT: var elem = document.getElementById("animated_element"); var x = 0; while (true) { elem.style.left = x; x = (x + 10) % 200; [...]
JavaScript on the command line or as a shell scripting language
(Indexed 2009-09-03):
I am always fascinated that no matter how shiny the OS, sooner or later you'll end up typing things into a text console to get the darn machine to do what you want it to. To make matters worse you also have to resort to languages that you don't use every day but are from [...]
Creating a querySelector for IE that runs at native speed
(Indexed 2009-08-28):
Hello Ajaxians, my name is Paul Young and I am the co-founder of Skybound Software. We're the company behind Stylizer, which is a real-time CSS editing tool. We're taking a pretty radical approach to CSS editing, and as such, a lot of what I do is "web technology research", which is looking for better ways [...]
Aristo and Ace; Good looking and open?
(Indexed 2009-08-27):
We have talked about Aristo, the creative commons look and feel from 280 North and Sofa, quite a few times.Allen Pike has posted a comparison of Aristo with the new Ace look and feel that SproutCore recently added. It is great to see great looking stuff coming from these open source JavaScript libraries!
TestSwarm: Crowdsource your continuous tests for JavaScript
(Indexed 2009-08-26):
It has been a pleasure to watch John build TestSwarm and see its alpha release today. It is an ambitious project to help developers get real world testing across browsers. Here you can see it all at work:John talks about some of the fun challenges:TestSwarm ended up being a very challenging project to get to [...]
$100 off The Ajax Experience expires Friday
(Indexed 2009-08-24):
This Friday, August 28 marks the $100 off early-bird deadline for The Ajax Experience conference, September 14-16 in Boston, MA. Friday is your last chance to save $100 off the registration fee. Visit the conference site to register now!Below is the latest agenda at-a-glance with over 40 essential sessions, case studies, interactive panels andinsightful keynotesfrom [...]
Taking JavaScript all the way with MVC
(Indexed 2009-08-21):
Peter Michaux posted about going all the way with a full client-server app view that looks like:PLAIN TEXTHTML: <!DOCTYPE html><html><head> <title>The App</title></head><body> <script src="/static/js/the-app/bootstrap.js" type="text/javascript"></script></body>&...(truncated)... Webber then showed what the GWT Showcase example could look like (a touch different):PLAIN TEXTHTML: <!DOCTYPE>...(truncated)...
jXHR: XHR API, JSON-P backend conduit
(Indexed 2009-08-20):
The Mullet: Business up front, party in the rearKyle has take the XHR API that we all know and…. wrap…. and married it with a JSON-P transport to make jXHR.He tells us more:I’ve put out a very simple little project called jXHR which does cross-domain Ajax via JSON-P calls (meaning, totally javascript based), but does [...]
Details on JS compression; Squeezing every last byte on the wire
(Indexed 2009-08-19):
Ray Cromwell has a great article on techniques he has used with JavaScript compression to bring down the payload of your Ajax application.There are some fantastic advantages to JavaScript being “binary as source” but there is also a real issue with it. We have to make a trade-off on verbose code…. even with minifiers and [...]
Social coding step one; Collaboration support in Bespin launched
(Indexed 2009-08-14):
This content re-posted from my personal blog. You can choose to follow the Bespin team on Twitter: @dalmaer (Dion Almaer, early look at Ajaxian posts), @bgalbs (Ben Galbraith), @dangoor (Kevin Dangoor), @joewalker (Joe Walker) and @bespin itself.Bob in Boston: “Hey Harris, can you help me on a bit of code?”Harry in Hamstead: “Sure Bob, can [...]
Seeking Proposals for Lightning Rounds at The Ajax Experience conference
(Indexed 2009-08-14):
The Ajax Experience is being held September 14-16 at the Hilton Logan Airport in Boston.What are Lightning Rounds?:Lightning Rounds are 5 minute sessions are designed to showcase new cool Ajax stuff, cutting edge technology, new solutions and emerging trends; it is also an opportunity to get new information out to the community. Speakers are limited [...]
Skulpt: Crazy project that lets your browser parse and run Python
(Indexed 2009-08-13):
Skulpt is an entirely in-browser implementation of Python.Really. Crazy and cool.You can build an example term like this just via:PLAIN TEXTJAVASCRIPT: window.addEvent('domready', function() { var term = initTerminal(80, 20); // set up demo typers $('codeexample1').addEvent('click', (function(e) { e...(truncated)...
Last Chance: Free Book Offer Ends Friday
(Indexed 2009-08-12):
This is a friendly reminder that our free book giveaway for The Ajax Experience is about to expire. Anyone who registers between August 4 and this Friday, August 14, can take their pick of a book from our developers’ library (this offer is to sweeten the deal for those who didn’t get to take advantage [...]
HTML5 Audio + Processing(Canvas) Experiment
(Indexed 2009-08-05):
Sebastian Deutsch has a nice new experiment that uses HTML5 audio + Processing (which uses Canvas) to visualize Twitter streams sync’d to music.In their words:Weve created a litttle experiment which loads 100 tweets related to HTML5 and displays them using a javascript-based particle engine. Each particle represents a tweet click on one of them [...]
Google Chrome Eclipse Debugger
(Indexed 2009-08-05):
Google Chrome has had a V8 debugger for some time, and they just released a Chrome Dev Tools Protocol that builds on that:The V8 Debugger protocol covers only JavaScript debugging operations, and only within a single V8 virtual machine (VM). In reality, there can be one or more separate V8 VMs inside a Google Chrome [...]
Book Giveaway for The Ajax Experience!
(Indexed 2009-08-04):
August 28th marks the $100 off early-bird deadline for The Ajax Experience conference, September 14-16 in Boston, MA. Have yet to take advantage of early-bird savings? No worries. We’ve arranged a plan to sweeten the deal.Here’s the scoop:Anyone who registers for The Ajax Experience over the next 2 weeks can take their pick of a [...]
Cartagen: Rich mapping on the client side
(Indexed 2009-08-03):
Ben Weissmann is one of the researchers at the MIT Media Lab's Design Ecology group who's working on Cartagen, a vector-based, client-side framework for rendering maps in native HTML 5. It's impressive. Here he explains more:Using JavaScript and HTML5's canvas element, Cartagen takes data (including OpenStreetMap data) and renders it in the browser. This provides [...]
WPS: PostScript and PDF interpreter for HTML 5 canvas
(Indexed 2009-07-31):
It would be a pretty cool hack to implement a PostScript/PDF interpreter in JavaScript wouldn't it? That is exactly what has been done with WPS.The code takes PS and really groks it so:PLAIN TEXTJAVASCRIPT: /n 10 def/w 25 def 0 0 n w mul dup .gbox 4 dict begin 0 1 n 1 sub { /i exch [...]
Best way to load your JavaScript
(Indexed 2009-07-30):
Nicholas Zakas thinks he has the best way to load JavaScript.Steve Souders has a bunch of best practices, and it seems that there is definitely nuance that makes advice very much tailored to your circumstance.Nicholas though, has an opinion:Ive come to the conclusion that theres just one best practice for loading JavaScript without blocking:Create two [...]
Be an early bird - $300 off expires Friday
(Indexed 2009-07-29):
Hi everybody,Aquick reminder that $300off The Ajax Experience conference expires this Friday, July 31.The Ajax Experience is September 14 - 16 in Boston, MA.www.AjaxExperience.comBe an early bird. Save $300 now!We hope to see you there!The Ajaxian.com team
Dynamic script generation and memory leaks
(Indexed 2009-07-28):
An interesting piece by Neil Fraser shows that using JSON-P with generated script nodes can be quite a memory leak. Normally you'd add information returned from an API in JSON-P with a generated script node:PLAIN TEXTJAVASCRIPT: script = document.createElement('script'); script.src = 'http://example.com/cgi-bin/jsonp?q=What+is+the+meaning+of+l...(truncated)... script.id = 'JSONP'; script.type = 'text/javascript'; script.charset = 'utf-8'; // Add the script [...]
The Ajax Experience Agenda At-a-Glance Now Available!
(Indexed 2009-07-27):
Over the past few weeks we’ve finalized over 40 key sessions across7 tracks for The Ajax Experience conference, including Frameworks, User Experience, Standards and Cross-Browser Issues, High Performance and Scalability, Security, Architecture, JavaScript, and Cutting-Edge Ajax. The agenda-at-glance is ready for your review now. There’s something for everyone! Check it out The Ajax Experience is [...]
Adding your own scripts to Web Workers
(Indexed 2009-07-27):
Over in Geneva, they have posted on coupling PHP and Workers. They build on the great intro from John and tweak it to use simple PHP on the backend to do things such as making sure that your favourite library has been loaded into each Worker, so you can use it in your script.PLAIN TEXTJAVASCRIPT: // [...]
Wouldnt it be Swell to be able to drag and drop between Web and desktop
(Indexed 2009-07-21):
Christophe Ebl has kindly written a guest post on Swell JS and his drag and drop manager that works with your desktop. Here he tells us more:At Swell we were about to create a Drag & Drop Manager just like in other Javascript libraries such as Jquery, YUI, Mootools, Scriptaculous, but we were not really [...]
A detailed look at how tracing, and TraceMonkey works
(Indexed 2009-07-20):
David Mandelin has generously detailed an overview of tracing and TraceMonkey in particular.He starts out by explaining the problem at hand: making a dynamic language such as JavaScript fast is hard.How do you get type info in dynamic type land?Our goal in TraceMonkey is to compile type-specialized code. To do that, TraceMonkey needs to know [...]
A new way to do layout; CSS Scripting Layout
(Indexed 2009-07-17):
CSS is great for styling, but can be agonizing for laying out applications. There have been attempts to do JavaScript powered layout, but what about adding more semantics to CSS itself?Darrel Karisch has posted on just that, with his CSS Scripting Layout:This document describes a new set of CSS properties and object specifications that together [...]
Fun Friday Platformer
(Indexed 2009-07-17):
Fancy a break? Take Mr. Speaker’s little JavaScript platformer for a spin.Have a great weekend, and a quick reminder:Think that we have missed a story? Please share news with us. Don’t assume that we missed it on purpose! Want to contribute a full story? Please!The crew hangs out on Twitter, and a lot of tips [...]
Swipe away, then quickly flip with simple jQuery plugins
(Indexed 2009-07-16):
Ryan Scherf has created a simple jQuery plugin that "uses Mobile Safari's built in touch events to allow jQuery binding of swipe events to any DOM element. You can override the swipeLeft and swipeRight defaults functions to create your own custom process when the gesture is detected."It can be used as simple as:PLAIN TEXTJAVASCRIPT: $('.swipe').swipe({ [...]
Keynotes Announced for The Ajax Experience!
(Indexed 2009-07-12):
Ajaxian.com’s The Ajax Experience gives you access to over 40 sessions presented by framework founders, independent experts and development leaders - all focused on proven solutions for current and emerging challenges plaguing Ajax developers, like performance, cross-browser rendering, security and architecture.Register Now for The Ajax Experience! September 14-16 in Boston, MA.Keynote presentations examine advancements being [...]
GOTO is here
(Indexed 2009-07-10):
Ah GOTO. Now life is complete. How could one enjoy a Fun Friday better than looking at a goto implementation in JavaScript:PLAIN TEXTHTML: <script type="text/jsplusgoto">var a = 0;[lbl] topOfLoop:a++;if (a <292 ) { goto topOfLoop;}document.getElementById('relevantLink'...(truncated)... 'http://www.xkcd.com/' + a);</script> Note the "text/jsplusgoto" in there. The nice simple parseScripts abstraction is used to find that code, mun...(truncated)...
Pimping JSON - YQL now offers JSONP-X!
(Indexed 2009-07-09):
Yesterday's announcement of Yahoo's YQL now supporting insert, update and delete overshadowed another interesting new feature: JSONP-X output. Here's what it is and why it is useful: YQL data can be returned in XML which is annoying to use in JavaScript (for starters because of crossdomain issues in Ajax). JSON is much easier as it [...]
Ouh, shiny! BBCs Glow is finally out
(Indexed 2009-07-08):
After being rumoured and showcased at @media Ajax 2008 by Jake Archibald in a pretty epic presentation (audio) the BBC now finally went through all the red tape needed and Glow is available as open source. Glow is the BBC’s own JavaScript library and in use on their sites. The reason to build an own [...]
Open Web Tools Directory
(Indexed 2009-07-07):
Over at the Mozilla Labs blog, we just launched an “Open Web Tools Directory”. Running Ajaxian for the past few years, we’ve discussed a legion of developer tools of all shapes and sizes, but there are so many we’ve quickly lost track of all that’s available.With the Tools Directory, we hope to provide a central [...]
Joyent Smart Platform: Auto-scaling Server Side JS
(Indexed 2009-07-07):
James Duncan of Joyent has been chatting about his awesome autoscaling JavaScript platform for awhile, and it just launched:The Smart Platform is an open source Platform-as-a-Service, allowing you to develop and deploy applications to the cloud, while letting the platform take care of all the system administration and scaling problems your application faces.You pay for [...]
Its Friday. Play some drums. HTML5 style
(Indexed 2009-07-03):
Brian Arnold created a fun sample drum machine simulator using HTML5 <audio>.PLAIN TEXTJAVASCRIPT: function playBeat() { if (isPlaying) { var nextBeat = 60000 / curTempo / 4; // Turn off all lights on the tracker's row [...]
A whole lot of testing for JavaScript implementations
(Indexed 2009-07-01):
A couple of releases related to unit testing and JavaScript came out on the same day.First, the JScript team posted a set of ECMAScript 5 tests.... 900 to be exact, and the focus on features that are new to ECMAScript 5.All of the tests are released under New BSD.Then, the V8 team announced Sputnik, a [...]
LABjs: Simple abstraction for loading dependencies correctly
(Indexed 2009-06-30):
Kyle Simpson has developed LABjs, a library that lets you define your JavaScript file dependencies, and then loads them as efficiently as possible.Kyle told us:This project is a simple little tool (1.6k compressed!) for being able to load javascript files dynamically. It's like a lot of similar projects where the goal is to improve the [...]
New Sessions at The Ajax Experience 2009
(Indexed 2009-06-29):
Summer is right around the corner - so before you make any vacation plans here’s one quick action item to cross off your to-do list: Register now to lock in exclusive $300 savings for The Ajax Experience conference, September 14-16 in Boston, MA.It’s only beentwo weekssince we announced open registration for The Ajax Experience with [...]
Fun with text-shadow
(Indexed 2009-06-26):
Zach Johnson is at it again, this time giving us a fun Friday treat with CSS text shadow, all via:PLAIN TEXTJAVASCRIPT: document.getElementById('text-shado...(truncated)... = function(e) { var xm = e.clientX - 300; var ym = e.clientY - 175; var d = Math.sqrt(xm*xm + ym*ym); text.style.textShadow = -xm + 'px ' + -ym + [...]
JavaScript sandbox using Web Workers
(Indexed 2009-06-25):
We have been sandboxing JavaScript in iframes for a long time. The Web Worker API has the nice property that it doesn't have access to objects like document and the like, and just runs code that you can pass over to it.With this, Elijah Grey has created an experimental jsandbox API that gives you an [...]
iPhone 3GS runs faster than claims, if you go by SunSpider
(Indexed 2009-06-24):
Rana Sobhany of Medialets has posted on Sun Spider benchmarks of the iPhone 3GS as well as other devices which shows off the performance angle of 3GS:The WebKit Open Source Project provides a JavaScript test Suite dubbed SunSpider. According to the description on the SunSpider home page, this benchmark tests the core JavaScript language only, [...]
NodeIterator.areYou(IMPRESSED | WHOCARES | WHA?)
(Indexed 2009-06-19):
John Resig has posted on the DOM traversal methods now in Firefox 3.5 and then a spin out post on the merits of the NodeIterator API. He isn't impressed:This API is, at best, bloated, and at worst incredibly misguided and impractical for day-to-day use.Observe the method signature of createNodeIterator:PLAIN TEXTJAVASCRIPT: var nodeIterator = document.createNodeIterator( root, // [...]
Serial Asynchronous XmlHttpRequests
(Indexed 2009-06-19):
By default we should always favour asynchronous XHR to help the responsiveness of our Web applications. However, have you ever wanted a way to serialize your XHR calls because you needed to do things in sequence as B relied on what came back from A?You could call a synchronous Ajax call, but that locks up [...]
JavaScript Compatibility Tests
(Indexed 2009-06-18):
Robert Nyman has setup a really nice test suite for JavaScript 1.6, 1.7, and 1.8+ features such as getters/setters, Object.defineProperty, Object.getPrototypeOf, new String extras, and JSON.It includes compatibility tables, and will try to run the tests on your browser to give you feedback. It also includes sample code to check web browser support that you [...]
Registration Now Open for The Ajax Experience 2009!
(Indexed 2009-06-17):
”When the heck are you guys going to open registration for The Ajax Experience this year!?”Over the last 3 months that is, without question, the most frequently received email we’ve had from Ajaxian members like you. The good news is that the wait is finally over! Registration has officially opened for this year’s Ajax Experience [...]
JS.Class 2.1 released
(Indexed 2009-06-12):
James Coglan has updated JS.Class, his implementation of Ruby’s object system in JavaScript. This release includes a Hash implementation, HashSet, an updated Ruby 1.9 Enumerable module with enumerators and Symbol#to_proc functionality, and an improved package loader that supports parallel downloads and runs on SpiderMonkey, Rhino and V8.Detailed ChangesNew libraries: ConstantScope, Hash and HashSet, a much [...]
InfoVis Toolkit 1.1
(Indexed 2009-06-12):
Nicolas Garcia Belmonte has updated InfoViz with version 1.1.The JavaScript InfoVis Toolkit provides tools for creating Interactive Data Visualizations for the Web. The code has been updated:The library has been split into modules for code reuse.All visualizations are packaged in the same file. You can create multiple instances of any visualization. Moreover, you can combine [...]
Animating SVG with Canvas and Burst
(Indexed 2009-06-11):
Christopher Blizzard and his team are doing great write-ups on hacks.mozilla.org as they celebrate 35 days of Open Web goodness.They just posted on the work of Alistair MacDonald who used his Burst engine to demonstrate taking SVG and having Burst load it and convert it all to JavaScript objects that are rendered inside of a [...]
jQuery Tools
(Indexed 2009-06-11):
Tero Piirainen has created a new package of jQuery Tools. This library contains six of the most useful JavaScript tools available for today's website. The beauty of this library is that all of these tools can be used together, extended, configured and styled. In the end, you can have hundreds of different widgets and new [...]
Ample SDK: Browser-in-a-Browser
(Indexed 2009-06-10):
Sergey Ilinsky, formerly of Ajax pioneer Backbase, has created a new Ajax toolkit called Ample SDK. The best way to describe Ample SDK is that it's a browser-within-a-browser, but not in the visual sense. Rather, it aims to implement in JavaScript the stack of rendering technologies typically delegated to the browser. For example, Ample currently [...]
Titanium gets hardened with new beta that features Mobile and more
(Indexed 2009-06-09):
Appcelerator has announced a Titanium beta that adds to their desktop vision with new APIs and developer tool but also allows you to create mobile applications using HTML/CSS/JavaScript (and in fact Ruby, Python, …) that run on iPhone and Android.You can take a look at what it takes to develop for desktop and mobile in [...]
Image thumbnail crop tool with Processing.js and PHP GD
(Indexed 2009-06-04):
Matt Schoen has written a nice image thumbnail tool that lets you zoom in on the part of the image that you want to crop for a thumbnail.You can check out the Processing code that does the work:PLAIN TEXTJAVASCRIPT: void setup(){ size(600, 600); //for internal size variables frameRate(30); //set our draw [...]
Importing and Exporting HTTP data with Firebug
(Indexed 2009-06-03):
Jan Odvarko of the Firebug team has created a new plugin and site that allows you to export data from Firebug in the HTTP Archive Format and then also view the JSON data via a HTTP Archive Viewer.The format will look a little like this:PLAIN TEXTJAVASCRIPT: ({ "log":{ "pages":[{ "startedDateTime":"Fri, 29 May [...]
AppJet users look to migrate apps
(Indexed 2009-06-02):
The team behind AppJet and the successful EtherPad have announced that they are discontinuing the hosting of AppJet applications. This is a shame, as the server side JavaScript programming module makes writing certain back ends a breeze, as they showed with EtherPad itself!I hope that it will rise again, just as I hope that Concorde [...]
Narwhal: Standard Library that implements ServerJS
(Indexed 2009-06-01):
Narwhal “a flexible JavaScript standard library” is now live thanks to:Tom Robinson’s Jack: the web server and web application/framework agnostic interface, similar to Rubys Rack and Pythons WSGI. Narwhal was conceived while building Jack, and was later extracted into its own project.Kris Kowal’s Chiron: a system of interoperable JavaScript modules, including a type system, base [...]
Web Storage Portability Layer: Abstract on top of HTML5 and Gears Storage
(Indexed 2009-05-29):
Robert Kroeger has released a nice library for local database access. The Web Storage Portability Layer nicely abstracts on top of HTML5 and Gears for database access.The WSPL consists of a collection of classes that provide asynchronous transactional access to both Gears and HTML5 databases and can be found on Project Hosting on Google Code.There [...]
GWT team Waves goodbye to annoying question; Its the API stupid
(Indexed 2009-05-29):
"Why doesn't Google use GWT more?"That is a question that I was asked maaaany a time. There are sites like Base and the old mashup editor and others.... but "why not something big like Gmail?"It was always so tough because it wasn't a totally fair question.Google has some of the best Ajax hackers out there. [...]
JSPlacemaker - Geo data extraction in pure JavaScript
(Indexed 2009-05-22):
Content extraction is still a hot topic on the web. We have lots of great text content but not much clue as to what those texts are. To make it more obvious we do term extraction for tagging but also geo location extraction for giving the text some spacial reference.A fairly new web service that [...]
Digg shows Multipart XMLHttpRequest prototype
(Indexed 2009-05-21):
Micah Snyder of Digg posted on DUI.Stream, an experimental library that implements a multipart XHR technique to bundle resources into one request and then breaks them out at the other end:One of the ways that high-performance websites like Yahoo suggest speeding up load times is by reducing the number of HTTP requests per page. We [...]
EcmaScript 5: Changes to JavaScript
(Indexed 2009-05-20):
Three Googlers, Mark Miller, Waldemar Horwat, and Mike Samuel gave the talk above to discuss how JavaScript is changing, and gets into detail on EcmaScript 5.The slides that go along with the talk are available in good ole simple HTML prezo form and show that the talk discusses topics such as:Accessor support:PLAIN TEXTJAVASCRIPT: var domoid = [...]
Someone at Apple, please review stance on PhoneGap
(Indexed 2009-05-19):
We are big fans of PhoneGap, the “open source development tool for building fast, easy mobile apps with JavaScript” including apps that run on the iPhone platform.The PhoneGap team has been winning awards and developers like it.However, we have just heard that some applications using PhoneGap have been targetted by the Apple review process:Upon review [...]
Crap I missed it, doesnt miss your file upload!
(Indexed 2009-05-18):
The Crap I missed it! crew took on the task of dealing with importing your iTunes XML file, and wanting to give you responsive feedback on the items as they come in. The usual tactic would be to suck in the entire file, and then process it.Michael Baldwin did more, and here he tells us [...]
A peek under the hood of YUI3 - Satyen Desai on library architecture
(Indexed 2009-05-15):
Talks about JavaScript are not a rare occasion any more, everybody has something to say about this wonderfully versatile language. Douglas Crockford taught us a lot about the language itself, John Resig and Peter Paul Koch taught us how browsers deal (and fail dealing) with it and there are dozens of screencasts of how to [...]
Ajax Frameworks Decision Center
(Indexed 2009-05-15):
Why choose which Ajax framework you can use, when you can let The Machine tell you! Jim Briggs of Athenz has pointed his decision machine at the age old problem of choosing which darn library to script src!Here is what Jim told us about the new service:There has been some discussion lately on Ajaxian about [...]
Monadic Parser in JavaScript
(Indexed 2009-05-14):
Jens Schmidt pointed us to an interesting project by “Mu Dynamics Research Labs” called p4js:p4js is a monadic parser library that provides the basic monadic operators return and bindThe announcement blog post explains some of the motivations behind the project:After exploring Haskell for some time, I find myself often adopting functional concepts in my daily [...]
3D Cube using new CSS transformations
(Indexed 2009-05-08):
Paul Hayes has been playing with CSS transformations and making 3D cubes:The impression of a three dimensional cube can be created using modern CSS techniques, without the need for JavaScript, imagery, canvas or SVG. Using the proprietary transform property to skew and rotate shaded rectangles, individual cube faces can combine to form a 3D object. [...]
Uberplayer shows us what JavaScript media players can look like
(Indexed 2009-05-07):
Media Players seem to be a hot topic right now. After the upgrades to Scott Schiller’s SoundManager, Paul Bakaus of the jQuery UI team now puts a firm stake into the ground with the uberplayer. The uberplayer takes a leaf out of the book of the UI of standalone media players. Instead of cluttering the [...]
Ext JS in Action Excerpts and Discount; Ext JS 3.0 RC update
(Indexed 2009-05-07):
Two pieces of news related to Ext JS hit at the same time. Firstly, Ext JS in Action has gone into early access mode, and Jesus Garcia has been kind enough to give the Ajaxian community some exclusive chapters for free:The Component Life CycleThis article is taken from the book Ext JS in Action. As [...]
A Better Javascript Memoizer
(Indexed 2009-05-05):
We have covered memoizers in the past, but John Hann has posted on a nice implementation that takes advantage of closures, arity, and recursion -- 3 concepts/features that Javascript was meant to use.It leads to this generic version:PLAIN TEXTJAVASCRIPT: // memoize: a general-purpose function to enable a function to use memoization// func: the function to be [...]
Rico 3.0 now runs on multiple libraries; LiveGrid with a jQuery theme for example?
(Indexed 2009-05-04):
Ah Rico. It was a big shot when Ajax jumped on the scene and Bill Scott was lashing up the accordion landscape. Now time has moved on, and Bill keeps feeding us with usability goodness, but what about Rico?Well, Matt Brown is now on the case and has an early preview of Rico 3.0 for [...]
No love for the module pattern?
(Indexed 2009-05-04):
There was a cheer when Doug showed people that the module pattern could nicely give you somewhat "private" access in JavaScript.At least, the Java folk definitely cheered.Jonathan Snook on the other hand has no love for the module pattern and, after using it for some time, now avoids it:Avoiding the Module Pattern makes debugging easier.When [...]
YQL execute now allows you to convert scraped data with server side JavaScript
(Indexed 2009-04-30):
I am a big fan of YQL, a terribly easy and fuss-free way to access APIs and mix data retrieved from them in a simple, SQL style language. Say for example you want photos of Paris,France from Flickr that are licensed with Creative Commons attribution, you can do this with a single command:PLAIN TEXTCODE:select * [...]
Twiggler, a sample app for the LM Framework
(Indexed 2009-04-30):
David Semeria has been working on LM, another Ajax framework, for a number of years and has just announced it.The first demo app is a highly customizable Twitter client, Twiggler, that runs in the browser.Unfortunately nothing is public on the framework so we can't see how it actually works. It looks kinda like Squeak or [...]
Ajax Framework Analysis Results
(Indexed 2009-04-29):
Matt Raible has posted on the analysis the he has done for a client on choosing an Ajax framework. This is the age old question “which Ajax framework should I use?” It is agonizing. It is hard. It isn’t pretty. We created a dartboard:Matts take compares Dojo, Ext JS, GWT, and YUI using various criteria [...]
vice-versa: the noble act of getting the best of all browsers
(Indexed 2009-04-28):
Andrea Giammarchi has a vision to have the best of all browsers available to him in JavaScript land. He has created vice versa as a project to explore this ideal and incredibly hard vision to attain:Studying the DOM, which is notoriously a mess, I often "travel" between the MDC and the MSDN to solve a [...]
Blackberry Storm using Raphael (SVG/VML) and SoundManager
(Indexed 2009-04-24):
Brad Neuberg pointed me to a Blackberry Storm site that uses Raphael, jQuery, and SoundManager to offer an SVG / VML (for IE) experience.PLAIN TEXTHTML: <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.0/jqu...(truncated)... src="/js/soundmanager2-nodebug-jsmin.js"></script...(truncated)... src="/js/raphael-min.js"></script><script src="/js/trig-min.js"></script>
myPatterns: XPath / RegEx for JS Objects
(Indexed 2009-04-23):
Nic Volanschi pointed us to myPatterns:myPatterns is a new library adding custom notations for data structures in JS (and also C). It's really useful for writing elegant programs using general pattern matching.To explain myPatterns, let's introduce a standard JavaScript object:PLAIN TEXTJavaScript:{ name: { firstname: "John", lastname: "Smith" }, children: [ { [...]
How many ways can you iterate over an array in JavaScript?
(Indexed 2009-04-23):
Myk is one of the nicest chaps that I have had the pleasure to sit closely to in Mozilla building "S".He has a nice little tip on the many syntaxes that you can use to iterate over arrays in various JavaScript implementations and standards. Some folks had some interesting points on the various approaches:for each [...]
Dynamically Generated PDFs with JavaScript?
(Indexed 2009-04-22):
In the “it-had-to-be-done-at-some-point” category, we give you James Hall’s latest project:I have started working on jsPDF, an entirely Javascript-based PDF generator. Currently the demo serves up the generated PDF as a Data URI, but it could be used on the server side or within browser extensions. It currently only supports simple text, but I’m working [...]
Perseveres JavaScriptDB: Impressive JSON Performance
(Indexed 2009-04-21):
Kris Zyp recently posted about an intriguing new chapter in the application persistence space:The latest beta of Persevere features a new native object storage engine called JavaScriptDB that provides high-end scalability and performance. Persevere now outperforms the common PHP and MySQL combination for accessing data via HTTP by about 40% and outperforms CouchDB by 249%. [...]
Browsing on the Couch
(Indexed 2009-04-21):
Atul Varma, a fantastic colleague in Building “S” at Mozilla, has been playing with a JavaScript implementation of CouchDB called BrowserCouch:BrowserCouch is an attempt at an in-browser MapReduce implementation. It’s written entirely in JavaScript and intended to work on all browsers, gracefully upgrading when support for better efficiency or feature set is detected.Not coincidentally, [...]
How JSON Schema is turning out for the Chrome extension APIs
(Indexed 2009-04-20):
When Aaron talked about the Chrome extension API he mentioned how he would see if JSON Schema could help them have a JSON heavy API and allow them to easily validate.He has quickly reported back and is happy with the results.Something like this:PLAIN TEXTJAVASCRIPT: chromium.tabs.createTab = function(tab, callback) { validate(arguments, arguments.callee.params); sendRequest(CreateTab, tab, callback);}; chromium.tabs.createTab.params = [...(truncated)...
Quince: UX Pattern Explorer (in Silverlight)
(Indexed 2009-04-17):
A reader recently pointed us to Quince, an on-line directory of UX design patterns created by Infragistics. At first glance, Quince seems an Ajax application with some interesting animated effects, but it turns out to have been written using Silverlight (no surprise given Infragistics background).Run-time platform notwithstanding, Quince contains around 100 patterns with large numbers [...]
Thumbnails.js: Screenshots via Page Glimpse
(Indexed 2009-04-17):
Eric Ferraiuolo, inspired by the deprecation notice of Alexa, wrote a webpage thumbnails JavaScript library that lets you grab web page thumbnails via Page Glimpse:PLAIN TEXTJAVASCRIPT: var container = document.getElementById('container'), thumbs = Thumbnails({ devkey:'xxx' }); thumbs.get('http://google.com', append); thumbs.get([ 'http://eric.ferraiuolo.name/', 'http://925html.com', 'htt...(truncated)...
Jabbify Comet Service Released
(Indexed 2009-04-16):
Brian Moschel and Justin Meyer of JavaScriptMVC have opened their Jabbify chat client into a general purpose Comet service called Jabbify. Some of their claims:Automatic Scaling: Jabbify scales to thousands of users per domain with no additional maintenance on your part.Instant setup: Download a script and you're developing with Comet in 30 seconds or less.Simple [...]
Giving you that CompSci 101 feeling with JavaScript
(Indexed 2009-04-16):
Nicholas Zakas is taking a break from performance posts as he starts a computer science in JavaScript repository.First up in the "remember that data structures weeder Comp Sci class?" moment is the linked list:It consists of a sequence of nodes, each containing arbitrary data fields and one or two references (links) pointing to the next [...]
FluidLayout; Having fun with em
(Indexed 2009-04-15):
Yusuf Akyol has created a simple fluid design library inspired by emastic that puts power into the em.Check out the test page and resize the browser to see the layout and font size change before your eyes.You use the framework via a little CSS and:PLAIN TEXTHTML: <script type="text/javascript"> fluidLayoutinit(yourFontSize, yourScreenSize); // yourFontSize is a hundred percent [...]
Notimoo Brings Growl to MooTools
(Indexed 2009-04-13):
Joining the world's collection of Growl-related libraries is Notimoo, a beautiful Growl implementation for MooTools. It's a little more sophisticated than most of the Growl ports as it supports persistence messages (that require a user's click to clear and scroll into view) and allows you to configure where on the screen the messages appear:PLAIN TEXTJavaScript:// [...]
EcmaScript Edition 5, formerly known as 3.1: Getting a new JavaScript
(Indexed 2009-04-13):
You probably remember the history. JavaScript 2, the reckoning, was going to come from EcmaScript Edition 4. That never happened, and instead the 3.1 group moved on with their agenda for "baby step" changes to the language.Now we have a final release of that work, with a new name, EcmaScript Edition 5 which is an [...]
The New TextboxList
(Indexed 2009-04-10):
Over at devthought, Guillermo Ranch has rewritten his clone of Facebook's "TextboxList" component:Its been some time since TextboxList got some attention. It is undoubtedly one of the my most popular JavaScript projects, along with the famous Fancy Menu (MorphList) and its slideshow sibling, BarackSlideshow.TextboxList has been rewritten from scratch, and its more solid than ever. [...]
Metatunnel 1k Demo: JS vs. OS
(Indexed 2009-04-10):
Dion and I talk frequently about how the web platform's capabilities are approaching the desktop, which features like canvas and faster JavaScript run-times. It's great to get a piece of humble pie like this one.FRequency created an interesting demo (as in "demo scene") of a "metatunnel":Paulo Falco ported this to JavaScript using <canvas>; how well [...]
FirePHP: Tying together Firebug and PHP
(Indexed 2009-04-10):
FirePHP solves the problem of AJAX debugging by sending debug information along with the response. To avoid breaking the response content, the debug information is placed into special HTTP response headers. This works for all types of requests, not just AJAX requests, which means you can even debug requests for images that are dynamically generated [...]
Safari-style Candybars for Everyone
(Indexed 2009-04-09):
Christian Effenberger wrote in with another impressive piece of work:Gauge.js 1.0 allows you to add programmable gauges (with shading and reflection) to your webpages.It uses unobtrusive javascript to keep your code clean.It works in all the major browsers - Mozilla Firefox 1.5+, Opera 9+, IE6+ and Safari.On older browsers, it’ll degrade and your visitors won’t [...]
jQuery Glow
(Indexed 2009-04-09):
PLAIN TEXTJAVASCRIPT: $(document).ready(function() { $('.white').addGlow({ textColor: 'white', haloColor: '#aaa', radius: 100 }); $('.blue').addGlow({ textColor: '#00f', haloColor: '#00f', radius: 100 }); $('.green').addGlow({ textColor: '#0f0', haloColor: '#0f0', radius: 100 }); $('.red').addGlow(&...(truncated)...
TIBCO donates GI to the Dojo Foundation
(Indexed 2009-04-08):
TIBCO was one of the first companies to help out Ajaxian, and I remember hanging out with Dylan Scheiman, Kevin Hakman, and Scott Fingerhut to chat Ajax.A lot has happened in the years between then and now, and it was cool to see that TIBCO has taken General Interface and donated it to the Dojo [...]
Chrome Extension API; How we wish we have named parameters
(Indexed 2009-04-07):
PLAIN TEXTJAVASCRIPT: chromium.tabs.createTab({ "url": "http://www.google.com/", "selected": true, "tabIndex": 3}); This is how you will probably create a new tab using the Chrome extensions API when it comes out.Aaron Boodman talked about the choice and how they are looking to make the APIs look more like this:I'm using the CRUD pattern as a starting point for all the major sub-systems' APIs. [...]
CSS is Awesome, so what about JavaScript?
(Indexed 2009-04-07):
That is a great mug, but the question is..... what can we do for JavaScript or HTML?
Need a Script? Check out AjaxRain.com
(Indexed 2009-04-06):
Launched in June, 2007, AjaxRain.com has continued its steady growth of aggregating awesome extensions for the popular JavaScript frameworks. It was a late starter coming after the popular site MiniAjax but while MiniAjax unfortunately stopped updates, AjaxRain continued loading up with top scripts from around the web. Currently listing 1200+ scripts, it has become the [...]
Detecting event support in browsers
(Indexed 2009-04-03):
Kangax has a really nice article on testing for event support in browsers in which he delves into the quirks and work-arounds needed to get 'er done, coming up with a nice generic solution:PLAIN TEXTJAVASCRIPT: var isEventSupported = (function(){ var TAGNAMES = { 'select':'input','change':'input', 'submit':'form','reset':'form', 'error':'img','load':'img','abort':'img' }...(truncated)...
Q42 Multiplayer Game Engine Open Sourced
(Indexed 2009-04-02):
Martin Kool of Q42 let us know that his company decided to open source the Q42 multiplayer engine which is "a lightweight, generic multi-user solution, allowing developers to create their own browser-based application or game over port 80."The engine is written in C# on the backend, and of course, JavaScript on the front end.You can [...]
Web April Fools
(Indexed 2009-04-01):
Ah, that time of year is here again. The day of the “Microsoft bought us” jape. Are there some good’uns this year?The early chaps who jumped the line a touch were the smashing magazine people talking about IE 8.1, all with WebKit/Gecko integration, fast JavaScript, CSS 3 support, and more.Then Opera does something actually quite [...]
JsContext to make your JsUnitTest look purty
(Indexed 2009-04-01):
Christian Johansen was sick of testNewUserWithClownShoesShouldSqueak code in his unit tests, so he took some inspiration from the Ruby Shoulda and Context frameworks and wrote JsContext which allows you to write:PLAIN TEXTJAVASCRIPT: new Test.Unit.Runner({ "A new User": JsContext({ "with clown shoes": JsContext({ "should squeak": function() { with(this) [......(truncated)...
Dojo 1.3 Released along with Plugd
(Indexed 2009-03-31):
We have been using Dojo 1.3 release candidates for awhile on Bespin, and today the Dojo team released Dojo 1.3 just in time for Internet Explorer 8.1 (really? some people believed that? I know that it isn't quite April Fools......).There are some nice usable APIs added to base such as:PLAIN TEXTJAVASCRIPT: // create a div.var n [...]
The differences between Callbacks and Events
(Indexed 2009-03-31):
Dean Edwards has a subtle piece on callbacks vs. events where he calls out the issue of libraries that support custom events dying out when one custom event dies.First, Dean sets the stage:PLAIN TEXTJAVASCRIPT: document.addEventListener("DOMContentLoaded", function() { console.log("Init: 1"); DOES_NOT_EXIST++; // this will throw an error}, false); document.addEventListener("DOMContentLoaded", function() { console.log&...(truncated)...
Improved Readability for JavaScript Unit Tests
(Indexed 2009-03-30):
Christian Johansen is tired of:mentally decoding test names like "testNewUserWithClownShoesShouldSqueak", so I've written some code to improve readability for JavaScript unit tests written using JsUnitTest (from prototypejs). It's heavily inspired by Ruby frameworks Shoulda and Context.Tests with his new framework--called jscontext--look like this:PLAIN TEXTJavaScript:new Test.Unit.Runner({ "A new User": JsContext({ "with clown [...]
How Can We Have More Ajax Experience Videos?
(Indexed 2009-03-27):
Fresh from our hidden cache, we bring you:Ajax 2.0 with Anne van KesterenAjax Testing Tool Review with Ted HustedAnalyzing the Ajax Application Performance with Gaurav SethBuilding Your First Adobe AIR Application with Kevin Hoyt
JSTalk: AppleScript without the weird language
(Indexed 2009-03-27):
Gus Mueller has announced JSTalk, an alternative to AppleScript that uses JavaScript and the JSCocoa bridge, and an Objective-J-like language alternative to hide the ugly_methods_when_needed.Here is Gus:JSTalk's goal can described like this: JSTalk is to AppleScript, what Cocoa is to Carbon.I know, I know. It's a lofty, crazy goal. But someone has do try and [...]
Querying the DOM on the Sly
(Indexed 2009-03-26):
Remember when we thought there may be less CSS selector engines? :) Instead we have renewed performance-based competition among them.Sly is the latest selector engine created by Harald Kirschner.To use, it looks like this:PLAIN TEXTJAVASCRIPT: // Finds all odd rows in all tablesvar rows = Sly.search('table td:odd'); // Finds all links with class "internal" and an [...]
Creating a clock in CSS
(Indexed 2009-03-26):
If you ever go to the BBC website you will see the working clock in the top right:It thus seems appropriate that Paul Hayes of London has created an interesting experiment that shows how you can create an analogue clock using just CSS and JavaScript is only used to get the current time.The real magic [...]
jQTouch: a mobile WebKit JavaScript framework
(Indexed 2009-03-26):
David Kaneda has created jQTouch a "jQuery plugin with native animations, auto list navigation, and default application styles for Mobile WebKit browsers like iPhone, G1, and Pre."FeaturesSetupjQTouch can now be initialized with one function:PLAIN TEXTJAVASCRIPT: $(document).jQTouch({ icon: 'jqtouch.png', statusBar: 'black-translucent'}); This function writes all of the meta tags needed for an iPhone web app. Here are the [...]
TestSwarm: Scaling JavaScript Tests
(Indexed 2009-03-25):
John Resig is working on a new tool that tries to help us scale our JavaScript testing. When building an Ajax application, how nice would it be to have a system running tests across multiple browsers and platforms? This is necessary for anything more than a toy, especially since we have some flexible software that [...]
Fuzzy CSS Grammar
(Indexed 2009-03-25):
Jesse Ruderman, security extraordinaire, has created many fuzzers in his time including a JavaScript one, and this time he has created a CSS gramar fuzzer:I wrote a CSS grammar fuzzer to test Gecko’s CSS parser. This fuzzer’s tricks:Declarative context-free grammar. This makes it easy to add new CSS features to the fuzzer, or even [...]
JuicyDrop: More fun with music visualizations
(Indexed 2009-03-25):
Jacob Seidelin is at it again, with another music visualization using canvas and more:A couple of weeks ago I played around with music visualization using JavaScript/canvas and SoundManager2. Well, I couldn’t leave it at that and as I mentioned in the comments, I had an eye on the MilkDrop plugin for Winamp. The result so [...]
Richard Stallman: Free the Javascript
(Indexed 2009-03-23):
Richard Stallman, founder of the GNU project and the Free Software Foundation, warns against the “trap” of running web apps whose Javascript is not licensed.Most web apps have source code that is “open” as far as being available in source code form (unless it’s obfuscated/compressed/generated). Indeed, this openness is a major factor in the rapid [...]
Debounce your JavaScript functions
(Indexed 2009-03-23):
John Hann has written an enjoyable post on debouncing JavaScript methods that comes with a fun back story on a project that John worked on.John gets to the matter of debouncing:Debouncing means to coalesce several temporally close signals into one signal. For example, your computer keyboard does this. Every time you hit a key, the [...]
Observe Dojo Events
(Indexed 2009-03-19):
Speaking of bookmarklets, in a recent blog post Nathan Kurtyka discusses a scenario familiar to many Ajax developers:However, I cant even begin to think about how much time Ive wasted hunting through source code hoping there might be some event I can subscribe to (e.g. What event is published when someone clicks on a Tree [...]
Analytic Tracking for Bookmarklets
(Indexed 2009-03-19):
Remy Sharp wrote in with something rather useful:I've written a small function that allows JavaScript developers track their bookmarklet (or other type of injected script) using Google Anayltics.We've been covering a fair number of bookmarklets lately, and this seems like a nice, compact (~700 byte) way to track who's using yours. Well done, Remy; check [...]
KeyTable: Instant keyboard navigation in a table
(Indexed 2009-03-18):
Allan Jardine is up to his old tricks again (his tricks are: creating helpful small tools!). This time he has created KeyTable, a library that adds the ability to use the keyboard to navigate around an HTML table.Events can be bound (and unbound) to cells as required by the developer, allowing increased accessibility to Javascript [...]
Super fast client side searches - the Flickr way
(Indexed 2009-03-18):
Over at the Flickr development blog, Ross Harmes, one of those lesser sung JavaScript heroes explains in detail how Flickr creates really fast client side searches and one of the implementations of these findings is the newly released find people faster feature: The main findings of the team were that eval() is not only evil [...]
Ajax Experience Talks: Resig, Slocum, and Heilmann
(Indexed 2009-03-17):
We've got another great round of talks for you today from John Resig, Jack Slocum, and Christian Heilmann.Advanced jQuery with John ResigAdvanced CSS and Theming of Ext with Jack SlocumVisual Programming with JavaScript with John ResigYUI for Control Freaks with Christian Heilmann
Mamoo: Client-side MVC from Motionbox
(Indexed 2009-03-17):
Over a year ago, we talked about Motionbox's event handler sugar for Prototype. In the intervening time, they've gone and done what every other JavaScript developer does: created their own full-fledged framework. ;-)Just a few days ago they announced Mamoo, short for "Motionbox Advanced Model Observer Observer". In a nutshell, Mamoo builds on the foundation [...]
More Particles in JavaScript
(Indexed 2009-03-16):
A long time ago we covered a simple particle engine in JavaScript, used to produce a toy fire effect (about two years later it was ported to canvas and got much faster).Pawel Witkowski wrote in with another particle demo, this one as a teaser to his promised future full-featured JavaScript particle framework:I spent some of [...]
Atmosphere: Comet Abstraction Framework
(Indexed 2009-03-16):
Jean-Francois Arcand announced a new Java-based framework that clients can code against for portable Comet support:Atmosphere 0.1-ALPHA1 is now officially released and support Tomcat, Jetty, Grizzly and GlassFish. Finally a Comet/Ajax Push framework you can build on top of it and deploy everywhere!One of the cool features of this release is that it auto-detects which [...]
Crock on Floating Points in JavaScript
(Indexed 2009-03-16):
Over on the YUI blog, Douglas Crockford wrote a piece discussing why JavaScript's current numeric type is problematic:JavaScript has a single number type: IEEE 754 Double Precision floating point... Unfortunately, a binary floating point type has some significant disadvantages. The worst is that it cannot accurately represent decimal fractions, which is a big problem because [...]
JavaScript version of XEyes
(Indexed 2009-03-16):
Let's start out the week with a bit of fun. David King has a little "port" of the good 'ole xeyes into JavaScript and it is a surprisingly small amount of code.He goes into how it all works in his article, covering the code like this:PLAIN TEXTJAVASCRIPT: // Get the distance with pythagorasvar difX = mouseX [...]
JavaScript API Viewer: Client-side parsing with Dojo
(Indexed 2009-03-13):
The uxebu folks have put together a really nice JavaScript API viewer that is entirely written in JavaScript a la Code Illuminated.The docs are very impressive, and it is indeed cool to do this all on the client, so it works offline just as easily as online. The team talked about the various documentation formats [...]
Custom info windows with jQuery and Google Maps
(Indexed 2009-03-13):
Ben Nolan has a writeup on a new feature in his Weheartplaces application that tweaks the info popup that comes with Google Maps by using a custom overlay. He walks us through an example that ends up with an Infowin class like this:PLAIN TEXTJAVASCRIPT: // Infowin class for displaying a miniature info window. Does not// respond [...]
Object Oriented Event Handling and Widgets
(Indexed 2009-03-12):
Paul Chiu, author of Passbook, has written up his thoughts on reuse for widgets in large Ajax applications.The solution?For Passbook I decided to solve this problem once and for all. The solution I believe is in objectifying page elements as a block so that a panel with an edit and delete button can be duplicated [...]
DOMLint: Checking for Form Conflicts
(Indexed 2009-03-12):
A few days ago, Prototype developer Juriy Zaytsev announced a new utility, DOMLint. It aims to solve an obscure but important problem with forms and JavaScript:Form controls, for example, can be accessed by their "name" through property access of <form> element... What happens if we try to access an element whose name matches a function [...]
The Ajax Experience 2009 Call for Papers
(Indexed 2009-03-11):
Hello everybody!This week we opened the Call for Papers for The Ajax Experience 2009being held in Boston, September 14-16. If you have experience with frameworks, techniques, or technologies that drive high performance Web applications, or build frameworks or other tools to enable the creation or test of Ajax applications, take a look at our call [...]
Is optimizing CSS selectors worth it?
(Indexed 2009-03-11):
For most web sites, the possible performance gains from optimizing CSS selectors will be small, and are not worth the costs. There are some types of CSS rules and interactions with JavaScript that can make a page noticeably slower. This is where the focus should be. So Im starting to collect real world examples of [...]
Showing progress with the Safari 4 multiple file upload
(Indexed 2009-03-11):
Andrea Giammarchi has taken the new Safari 4 implementation of multi input file upload functionality and has written an article on how to write the client and server to enable this.He shares the new XHR implementation:PLAIN TEXTJAVASCRIPT: var xhr = new XMLHttpRequest, upload = xhr.upload;upload.onload = function(){ console.log("Data fully sent");};xhr.open("post", page, true);xhr.send(binaryData); and the delves [...]
Time Killer: Create o Dev
(Indexed 2009-03-10):
Here’s some fun from the Dojo team. Last year during The Ajax Experience, I remember Peter Higgins taking a snapshot of me. I really didn’t think much of it as we were all taking pics of the conference and it was cool to meet the Dojo team. Little did I know that it would turn [...]
fontAvailable: Test to see if a font is usable
(Indexed 2009-03-10):
Howard Rauscher has wrapped up a little script to test the users browser for a particular font support. fontAvailable is a jQuery plugin, but can easily be tweaked to be independent:PLAIN TEXTJAVASCRIPT: /* fontAvailable jQuery Plugin, v1.0 * * Copyright (c) 2009, Howard Rauscher * Licensed under the MIT License */ (function($) { $.fontAvailable = function(fontName) [...]
Share Your Knowledge at The Ajax Experience!
(Indexed 2009-03-09):
We’re seeking a few good technologists and speakers for The Ajax Experience 2009, to be held in Boston on September 14-16, 2009. If you have experience with frameworks, techniques, or technologies that drive high performance Web applications, or build frameworks or other tools to enable the creation or test of Ajax applications, take a look [...]
JavaScript build process using Ant
(Indexed 2009-03-09):
Johan "Spocke" Srlin of Moxiecode has written an article on a build process that uses Ant to munge JavaScript.The preprocessor lives in the open source js build tools project and allows you to do C-style ifdef type work:PLAIN TEXTJAVASCRIPT: // #ifdef somedefine someLogic(); // #endif someOtherLogic(); You can tie this together with Ant by using some custom rules to process [...]
The Art of Throwing Errors in JavaScript
(Indexed 2009-03-05):
Nicholas Zakas recently wrote a piece covering the basics of throwing errors in JavaScript:You can throw an by using the throw operator and providing an object to throw. Any type of object can be thrown, however, an Error object is the most typical to use:PLAIN TEXTJavaScript: throw new Error("Something bad happened.") When you throw an error in [...]
Dojo + Rails = Drails?
(Indexed 2009-03-05):
Bob Remeika pointed us to his recent labor of love: Drails:Introducing Dojo support for Ruby on Rails!drails is a helper library for using Dojo alongside Rails. It provides a Dojo implementation for all of the Rails helpers that would normally generate Prototype/Scriptaculous code so now ajaxifying your Rails application with Dojo is as simple [...]
Detect if the browser supports APNG
(Indexed 2009-03-04):
PLAIN TEXTJAVASCRIPT: (function(_global) { var apng_test = new Image(), canvas = document.createElement("canvas"), ctx = canvas.getContext("2d"); apng_test.src = "apng-test.png"; // a data URI will cause a security error so you _have_ to link to external resource // frame 1 (skipped on apng-supporting browsers): 0,0,0,255 // frame 2: 0,0,0,0 apng_test.onload = function() ...(truncated)...
Map Reduce in the browser
(Indexed 2009-03-04):
Ilya Grigorik of Igvita has proposed and built a collaborative Map Reduce system in JavaScript that allows browsers to dive in and use their CPU to do some things.On the JavaScript side you can do something like:PLAIN TEXTJAVASCRIPT: function map() { /* count the number of words in the body [...]
Juicer: Package your JavaScript and CSS
(Indexed 2009-03-03):
Christian Johansen has released Juicer a very nice Sprocket-esque tool for packaging and managing your JavaScript AND your CSS.It has taken all of the best practices and put them in one tool, including:resolve dependencies for JavaScripts and CSS filescombine filesadd cache busters to URLs inside CSS filescycle asset hosts for URLs in CSS filesminify files [...]
The Most Popular Sessions at TheServerSide Java Symposium
(Indexed 2009-03-02):
TheServerSide.com’s Java Symposium kicks off in less than 2 weeks!Our sister sitehas put together an impressive lineup of speakers and over 45 tech sessions and case studies that you should know about,like Identifying Browser Problems in Ajax Apps, Meet-up for Selenium, soapUI, HtmlUnit and Other Test Toolsand muchmore.And if you haven’t heard, Ajaxian members save [...]
Manipulating video in real time with Canvas
(Indexed 2009-03-02):
Now that we are getting browsers that natively grok video as well as images and the like, we can do interesting things.Paul Rouget has demonstrated "chroma-keying" (green screen effect) using JavaScript, the video tag, and canvas:The document establishes two canvas elements, with the IDs c1 and c2. Canvas c1 is used to display the [...]
Secret: Time for some Monday fun
(Indexed 2009-03-02):
Allan Jardine, a chap who I am a big fan of as he does great work, has a bit of Friday fun that I couldn't resist putting up on a Monday. He has created Secret "a Javascript library which provides the functions required for scanning an HTML document for certain characters, locating those characters on [...]
Nicole Sullivans Object Oriented CSS
(Indexed 2009-02-28):
Sometimes I’m so focused on JavaScript that it becomes a bit of a hammer for me that I try to use it on all problems. I forget about the power of CSS and what it can do. I recently met Nicole Sullivan at Web Directions North who is a CSS guru, especially around performance. She [...]
jsSO: Flash Shared Objects in Javascript
(Indexed 2009-02-27):
Daniel Prieler has created a new library that allows realtime communication in JavaScript between clients. It works by embedding Flash in the page which is connected to a rtmp-flash-server.JSSO works like this:The data-transfer and the connection to the server are maintained by a simple embedded Flashmovie in your page. The communication with other clients runs [...]
Ghosts in the machine - avoid using window.sun in Firefox as it starts the Java engine!
(Indexed 2009-02-27):
Sometimes you find leftovers of old technology in browsers that blow your mind. One of these "ghost in the machine" problems exists in Firefox: if you use window.sun or function sun() in JavaScript you effectively start the Java VM.There are a few "magic" properties on Mozilla's DOMWindow interface for supporting LiveConnect that will initialize the [...]
Aurora: Class types and invariants in JavaScript
(Indexed 2009-02-26):
Ryan Morr has created a really fun experiment that shows the versatility of JavaScript. He just announced Aurora, fun times with class types and invariants in JavaScript.He introduces the project:The goal of the project is to provide a means of defining instance variables bound to a specific data type as you would find in Java [...]
Namespace.js: take a wild guess.
(Indexed 2009-02-26):
Let's lead with code:PLAIN TEXTJAVASCRIPT: Namespace('foo.bar');foo.bar.myFunction = function() {}; Namespace('com.example', { MyClass: function() { return {}; }});var obj = new com.example.MyClass(); Namespace.use('com.e...(truncated)... obj2 = new MyClass(); // include com/example/RemoteClass.jsNamespace.include('com.example...(truncated)... obj3 = new com.example.Rem...(truncated)...
Parallax for the Moo Crowd
(Indexed 2009-02-26):
We've featured several implementations of the parallax effect here on Ajaxian. The newest creation comes from the team at Piksite who recently released their MooTools-powered mParallax extension:mParallax is an adaptation for MooTools framework of jParallax whose its author, Stephen Band, describes it like "jParallax turns a selected element into a 'window', or viewport, and all [...]
Ext JS and Adobe AIR
(Indexed 2009-02-25):
As we’ve been exploring ways to take Bespin to the desktop, we’ve looked closely at some of the single-site browser technologies and their individual APIs to work out which platform we favor. As we went through this exercise, Adobe AIR really impressed us with the richness of its JavaScript APIs which wrap native APIs (as [...]
JavaScript Function Call Profiling with FireUnit
(Indexed 2009-02-24):
John Resig has posted on JavaScript Function Call Profiling and new methods he has added to FireUnit:fireunit.getProfile();Run this method after you've run console.profile(); and console.profileEnd(); to get a full dump of the profiling information. For example, given the following profile run:You'll get the following JavaScript object returned from fireunit.getProfile():PLAIN TEXTJAVASCRIPT: { "time": 8.443, "calls": 611, "data":[ [...]
Creating another library called Prototype?
(Indexed 2009-02-24):
Ben Gerrissen has created a library to handle prototype-based inheritance and the module pattern.The problem is that Ben named it Prototype! Are you kidding me Ben? :)As a reaction to the Javascript Inheritance Performance post, I found myself thinking; Why is everyone trying to superimpose Classical OO on Prototypical OO and There should be a [...]
Watching Prototype events and a nice little tip
(Indexed 2009-02-23):
Kangax shows a nice use of Prototype as he writes a tip to let you see your Prototype based events as they run in your application. A nice little view.He also realized that the core piece of the bookmarklet is actually a nice view of the power of Prototype as a library:PLAIN TEXTJAVASCRIPT: $H(Event.cache).inject(0, function(m, p) [...]
Building a presentation experience using CSS transitions and animations
(Indexed 2009-02-23):
JavaScript guru extraordinaire Erik Arvidsson has been playing with the new CSS transitions and animations that WebKit lead out with.He decided to build a sample presentation system:It is interesting to see the three versions that he builds.First, he uses CSS animations and @keyframes, and all that goodness, but for what he was doing it had [...]
Sprockets: Build time JavaScript dependancy management
(Indexed 2009-02-20):
Sprockets is a build time Ruby tool that reads in your JavaScript files, preprocesses and concatenates:It takes any number of source files and preprocesses them line-by-line in order to build a single concatenation. Specially formatted lines act as directives to the Sprockets preprocessor, telling it to require the contents of another file or library first [...]
Comparison of JavaScript Inheritance Mechanisms; Proposal
(Indexed 2009-02-20):
Andrea Giammarchi took the time to compare the JavaScript inheritance mechanisms in base2, Dojo, jsClass, MooTools, Prototype, and YUI and illustrates the same scenario with all of those frameworks. Handy indeed!He concludes with a proposal:WebReflection ProposalAfter an analysis like this one, how could I skip my "all the best from others without troubles" proposal?These are [...]
Caching scripts in HTML5 Database
(Indexed 2009-02-20):
Ian Collins has created DBScriptCache, a JavaScript program that "automatically caches script files in the browser's HTML5 client-side database. Rather than including your scripts using script tags, you include them using this script. The first time a user views the page the scripts will be pulled into the db and stored. On subsequent visits the [...]
Nextpoint releases open source project Growl4Rails
(Indexed 2009-02-19):
The team at Nextpoint has released the open source project Growl4Rails, a component providing Growl-like functionality in Rails web applications.Nextpoint’s e-discovery product deals with many very large documents. Indexing, imaging and PDF-ing of those documents can take a bit of time, which requires us to execute these tasks asynchronously. Background processing demands a [...]
Box2D Ported to JavaScript Using Canvas
(Indexed 2009-02-19):
Robert Kieffer recently told us about Box2DJS, an automated port of the popular Box2D physics library to JavaScript using <canvas> for the rendering.Using Box2DJS, you can create a flatland-esque 2D world that obeys Newtonian physics:PLAIN TEXTJavaScript: var worldAABB = new b2AABB();worldAABB.minVertex.Set(-1000, -1000);worldAABB.maxVertex.Set(1000, 1000);var gravity = new b2Vec2(0, 300);var doSleep = true;var world = new b2World(worldAABB, gravi...(truncated)...
JavaScriptMVC 1.5 Released
(Indexed 2009-02-18):
Justin Meyer emailed me to let me know that JavaScriptMVC, the framework that provides a Model-View-Controller (MVC) pattern for JavaScript development, has been updated and version 1.5 is offically available for download.New features include:Env.js/Shrinksafe based compression: A custom env to simulate the browser. As the browser encounters script tags, it adds them to a [...]
JavaScript Inheritance Performance
(Indexed 2009-02-18):
Robert Kieffer has run some benchmarks on the performance of JavaScript inheritance using different inheritance techniques:One area of the Prototype JavaScript library that I have a bit of a love-hate relationship with is its support for mimicing OO inheritance. The ability to call $super from within a function to refer to a superclass implementation [...]
Xopus Application Framework: Objective-J Done Different
(Indexed 2009-02-17):
The good folks at Xopus (the really cool browser-based XML editor) have been working largely in silence on a new version of their application. They've recently posted a presentation that talks about the framework behind this new version of Xopus.In the linked PDF, the framework is revealed to be an "object-oriented 'extended subset' of JavaScript", [...]
jQuery Ajax Experience Framework Videos
(Indexed 2009-02-17):
Today's post of Ajax Experience videos from our Fall 2008 show features jQuery. Enjoy!Intro to jQuery with John ResigAdvanced jQuery with John ResigAn In-Depth Look at jQuery UI with Paul BaukusRich Interactivity, Simplified, with jQuery UI with Richard WorthjQuery on Rails (The Real Ones) with Jonathan Sharp
Designing a JavaScript client for a REST API
(Indexed 2009-02-16):
This is a guest post by Jared Jacobs of the KaChing, an exciting new way to do your own hedge fund, the Web 2.0 way (a.k.a. don't give it to Madoff!). I was very happy when he said he would be willing to do a post on REST APIs, and what makes a good design.So [...]
xLazyLoader: Lazy loader callback framework
(Indexed 2009-02-16):
Oleg Slobodskoi, guru behind jimdo.com, has open sourced xLazyLoader a jQuery plugin that lets you asynchronously load resources such as JavaScript, CSS, and images. Quite useful if you want to head of and load some CSS to do something custom and you need the callback.ExamplePLAIN TEXTJAVASCRIPT: $.xLazyLoader({ js: ['ui.core.js','ui.dialog.js'], css: ['ui.core.css', 'ui.dialog.css'], image: [...]
eCalc: Cross-platform Calculator with Ajax
(Indexed 2009-02-11):
For a while, we’ve been giving a lot of thought to how Ajax developers can leverage their skills to play in the ISV marketplace. This conversation has gained a bit of heat over the past few months with the launch of Apple’s iPhone Marketplace–the fastest-growing ISV marketplace in software history.We’ve talked about platforms like Adobe [...]
JsonML: Who needs angle brackets?
(Indexed 2009-02-11):
JsonML swaps out the world of the curly with that of the angle.The purpose of JsonML is to provide a compact format for transporting XML-based data via JSON.Simon Willison says it best:An almost non-lossy serialization format for sending XML as JSON (plain text in between elements is ignored). Uses the (element-name, attribute-dictionary, list-of-children) tuple format, [...]
Piano Etudes: Garage Band, Piano Style
(Indexed 2009-02-10):
What would a fun Ajax interface to piano composition look like? Jason Freeman, a prof in the music department of the Georgia Institute of Technology has created an interface using GWT called Piano Etudes.His project lets users create and share their own versions of short piano pieces (and print them out as musical scores for [...]
Ajaxian Offer: $200 off expires this Friday
(Indexed 2009-02-09):
This Friday is the LAST CHANCE for Ajaxian readers to save $200 off TheServerSide Java Symposium, anevent hosted by our sister site TheServerSide.com.Every little bit helps in this economy - register today with the code AJAXIAN to pay only $1495 for the conference, coming to Las Vegas March 18-20.You don’t want to miss:Intro and Advanced [...]
Building an isNative method
(Indexed 2009-02-09):
If you want to test if a method is "native" in that the host provided the methods, versus a third party method (including one that has overridden a native function) it can be tricky.Kangax posted on the issue where he took a note Diego Perini on an impl:PLAIN TEXTJAVASCRIPT: // detect native method in object// not [...]
True JavaScript Hash Table
(Indexed 2009-02-06):
While it's great that JavaScript has a built-in hash-like mechanism, but it is limited to string keys. Tim Down recently filled us in on his project to create a more flexible hash table:I occasionally want a proper hash table in JavaScript, by which I meansomething that can map an arbitrary key object with another arbitraryvalue [...]
Opera comes out with new JavaScript engine in Carakan, new hardware API in Vega
(Indexed 2009-02-05):
Opera isn’t sitting on their heels as the other browser vendors get snappy (even if other claim so!)Today they announced Carakan a new register based JavaScript VM that is currently 2.5 times faster than their existing one (based on SunSpider). It does native code generation including at specializing for Regex (interestingly since irregex for Chrome [...]
Speeding up your JavaScript: Part 3 and 4
(Indexed 2009-02-05):
Nicholas C. Zakas wraps up his series on speeding up JavaScript with two more posts on the subject.First up, he delves deeper into a generic memoizer:In part 2 of this series, I wrote briefly about handling too much recursion in a function through memoization. Memoization is a technique for caching previously calculated values so that [...]
irregexp: New fast Regexp engine in Chrome
(Indexed 2009-02-04):
We are seeing great work with faster JavaScript, but what about faster DOM? Or faster CSS? Or faster libraries? Or faster Regexp? Well, members of the Chrome team have announced irregexp, a faster Regexp engine for Chrome. They go into detail on what they had, what they did, and why they did it.It is [...]
HTML5 Features in latest iPhone; Application Cache and Database
(Indexed 2009-02-03):
Brad Neuberg told me about two cool additions to the iPhone that now use HTML5 features:Safari JavaScript Database ProgrammingThe HTML 5 specification provides a new mechanism for client-side data storage: JavaScript database support. HTML 5 is currently in development by the Web Hypertext Application Technology Working Group (WHATWG).JavaScript database support is available in Safari 3.1 [...]
Yet More Ajax Experience Videos: Frameworks
(Indexed 2009-02-03):
And, more Ajax Experience videos! This post’s theme is “Frameworks”:New Features in DWR Version 3 with Joe WalkerDojo Fundamentals with Alex RussellJavaScript Library Overview with John ResigThe Road to Cappuccino with Francisco TolmaskyMooTools: An Overview with Aaron Newton
Joose 2.0 released
(Indexed 2009-02-03):
PLAIN TEXTJAVASCRIPT: Class("Point", { has: { x: {is: "ro"}, y: {is: "rw"}, }, methods: { clear: function () { this.x = 0; this.setY(0); } }}) Malte Ubl and the Joo...(truncated)...
Forget Chuck, Preloaders 3D right now!
(Indexed 2009-02-02):
I enjoy the US show Chuck (maybe because a geeky guy gets to hang with a beautiful woman? :) and there is a 3D episode to launch their new season. Our 2009 Ajax season relaunches an old favourite meme, the Ajax loaders (e.g. ajaxload.info) with a new 3D special.Timur Gafforov has given us Preloaders which [...]
Writing a JavaScript Tetris; Lessons learned from a Ruby chap
(Indexed 2009-02-02):
We often get games sent our way, and try to keep those posts for Fridays. This one is different though. Thomas Kjeldahl Nilsson didn’t just write another Tetris clone in JavaScript, he documented his experience. He posted a series of articles on the various steps, and not only do you learn how to build a [...]
JSINQ: LINQ style access for JavaScript objects
(Indexed 2009-02-02):
PLAIN TEXTJAVASCRIPT: from customer in $0group customer by customer.lastname into gselect {lastname: g.getKey(), count: g.count()}into rorderby r.count descendingselect r The code above should look similar to LINQ in .NET and runs with JSINQ a framework created by Kai Jger.With JSINQ, you can write SQL-like queries (or LINQ-like if you will) against arrays, DOM node lists or your [...]
Cubic Bezier timing function for all
(Indexed 2009-01-30):
Christian Effenberger is up to his tricks once again. This time he has created a cubic-bezier-timing function in the public domain that is compatible with -webkit-transition-timing-function:I thought that in addition to the -webkit-transition-timing-function cubic-bezier(), support for a 100% compatible easing defined by a cubic bezier function as a public domain javascript would be welcome.It should [...]
Becoming More Productive With JavaScript and Vim Screencast
(Indexed 2009-01-30):
Matthew Russell has created a nice screencast showing how to be more productive in Vim:Ive been doing some reflecting this week on how I can work smarter (instead of harder), and one of the things I came up with was adding a few more tools to my Vim repertoire. I spend more than half of [...]
w00t! Feeling Chatty
(Indexed 2009-01-30):
Live Ajax chat is one of those Comet 101 kind of examples (as RSS readers were to Ajax back in the day!).We saw a couple of items from this meme recently.First, jChat, a showcase chat application using Jaxer:Jaxer ships with a number of basic samples, but I've seen quite a few people online in search [...]
IE=v==v
(Indexed 2009-01-29):
PLAIN TEXTJAVASCRIPT: IE='v'=='v' That is the current winner in the shortest way to test for IE (including 8). The other notable was:PLAIN TEXTJAVASCRIPT: IE=top.execScript?1:0 Huh :)
What Server Side JavaScript needs; Join in!
(Indexed 2009-01-29):
Kevin Dangoor, colleague of ours in the Mozilla Developer Tools group, has created a Server JavaScript group to discuss what server side JavaScript needs. It feels a little like the Java world pre-Servlets, with many similar but different APIs in implementations. Let’s listen to Kevin’s thoughts, and let us know your thoughts!Server side JavaScript technology [...]
Rotate images with Canvas jQuery plugin
(Indexed 2009-01-29):
Pawel Witkowski released an interesting jQuery plugin called Wilq32.RotateImage that lets you rotate images simply:PLAIN TEXTJAVASCRIPT: // just do it 5 degrees$('#image2').rotate({angle:5}...(truncated)... animate the rotationvar rot=$('#image3').rotate({maxAngle:25,minAng...(truncated)... bind: [ {"mouseover":function(){rot.rotateAnimatio...(truncated)... {"mouseout":function(){rot.rotateA...(truncated)...
Jack: A port of Rack to JavaScript
(Indexed 2009-01-28):
Tom Robinson (Cappuccino, Objective J, 280* fame) is someone you should follow on Github as he comes up with cool stuff such as cappruby "a Ruby implementation on top of JavaScript / Objective-J runtime. Proof of concept stage."But that isn't why we are here today. Tom has a new project called Jack which is a [...]
Xccessors: Cross browser JavaScript get/setters
(Indexed 2009-01-28):
Elijah Grey has created a shim called Xccessors that "is a script that implements the legacy methods for defining and looking up object accessors (getters and setters) of objects in JavaScript using ECMAScript 3.1s accessors standard. This is aimed at adding support for the legacy method in IE8 RC1."You can check out a demo of [...]
WebDAV Client in Ajax
(Indexed 2009-01-27):
Ajax File Browser isn’t just a set of tree components. It implements the WebDAV API, and features:Cross-browser, cross-OS: runs in IE, Firefox, Safari and ChromeWebDAV RFC 2518 compliantPOST-upload and upload progress supportAnd coming soon:Locks managementIE 8 and improved IE 7 supportUpload to third-party WebDAV serversMore programming features
Captcha cracking in JavaScript with Canvas and neural nets
(Indexed 2009-01-24):
Everybody’s favourite glass shield to protect web apps are CAPTCHAS. These are the distorted characters displayed on a page that a user has to enter before gaining access or sending off a form. They annoy normal users, are largely inaccessible to blind users or dyslexic people and are not that safe as we think they [...]
Dependency Management with the with YUI Loader
(Indexed 2009-01-23):
Simon Tiffert told us of a co-workers post on loading your JavaScript modules with the YUI Loader.The post discusses how you can use the loader for your own libraries, giving you full dependency management, similar to that of the Dojo loader and others:As YUI comes with a special module for loading dependencies, the YUI Loader [...]
Speed up your JavaScript with memoization and queueing
(Indexed 2009-01-23):
Nicholas C. Zakas is back at it with part two of his Speed up your JavaScript series.This time he again discusses the problem with loops, and in this case nested loops:PLAIN TEXTJAVASCRIPT: function bubbleSort(items){ for (var i=items.length-1; i>= 0; i--){ for (var j=i; j>= 0; j--){ if [...]
JSLint Multi: Continously monitor multiple JavaScript files
(Indexed 2009-01-23):
Michael Schler and Jakob Kruse have created JSLint Multi a widget that acts as a continous linter for the Yahoo! Widgets platform:JSLint Multi uses Douglas Crockfords excellent JSLint tool to check your Javascript files for potential problems.Drag a folder unto JSLint Multi, and it will give you an overview of the JSLint status of every [...]
Having fun in the Ajax Playground
(Indexed 2009-01-22):
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 JavaScript APIs [...]
JavaScript Performance Rocks; Beware the DOM monster!
(Indexed 2009-01-22):
When I heard that the dynamic duo Thomas Fuchs and Amy Hoy were writing a book I wanted to check it out.They have released a beta version, which is pretty much code complete, with just some copy and illustration tweaks to come ($24).The book is actually a bit of a two in one, as not [...]
JsMemcached.js: JavaScript Jaxer Client
(Indexed 2009-01-22):
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):PLAIN TEXTJAVASCRIPT: JsMemcached.set("keyName", "Value here, as long as you want"); JsMemcached.get("keyName"); Js...(truncated)... // no open() as it is lazily done on your behalf
Platform Optimization Strategies for Ajax Toolkits
(Indexed 2009-01-22):
Dylan Schiemann has posted on Platform Optimization Strategies for Ajax Toolkits which covers techniques for having code run on multiple platforms effectively.He talks about how some frameworks have code paths for specific browsers to shorten the if (foo) type overhead. Having a compile step like GWT does makes this easy. TIBCO GI "builds an optimized [...]
JavaScript Behavior Sheet
(Indexed 2009-01-21):
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:PLAIN TEXTHTML: <script type="text/behavior" src="BehaviorSheet.jss"></script> The experiment uses a JSON object for now (e.g. the quotes):PLAIN TEXTJAVASCRIPT: "input[type=text].nomorethanfive": { click: function(e) { ...(truncated)...
How global is your JavaScript?
(Indexed 2009-01-20):
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 [...]
Sexy Page Curls
(Indexed 2009-01-20):
I thought that sexy curls were not related to technology, but Elliott Kember packaged a nice and easy page curl plugin using jQuery.All you need to do is:PLAIN TEXTHTML: <script type="text/javascript" src="turn/turn.js"></script><link rel="stylesheet" type="text/css" href="turn/turn.css"> <script>$(document).r...(truncated)... $( '#target' ).fold();});</script>
C3DL: Canvas 3D JavaScript Library
(Indexed 2009-01-19):
C3DL has a new release that "includes the following major features: - Collada Support: The ability to load collada models (of the triangle, polylist or polygon variety) along with their textures. Models with multiple nodes are supported and their names and relative transformation will all be imported."What is C3DL?The Canvas 3D JS Libary (C3DL) [...]
Web Resources He Uses
(Indexed 2009-01-19):
"Ethan" has a really nicely packaged set of web resources that he uses.From JavaScript core libraries, to widgets, to tools, to CSS frameworks, to CSS techniques, to browser compatibility, to typography, to extensions, and much much more. Nicely done.
Seeding the clipboard in Flash10 with Zero Clipboard
(Indexed 2009-01-16):
Following the bombshell of Adobe announcing that Flash 10 will not support unsolicited clipboard access from Flash and JavaScript as malicious flash ads flooded clipboards a lot of developers were wondering how to make the “copy to clipboard” still work without having to do it in Flash itself. An interesting and also slightly creepy approach [...]
MooTools Update: Milk, MooBugger, JavaScript techniques, and more
(Indexed 2009-01-16):
There has been a lot of interesting news in the MooTools community recently. Before it passes us by, I wanted to aggregate some of the goodies for your perusal:MooBuggerValerio and I spent a few weeks a while back putting together a bookmarklet that would give you a Firebug-style JavaScript console for browsers without Firebug (IE, [...]
XUI: A JavaScript Library for Mobile Devices
(Indexed 2009-01-16):
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 reason [...]
Next IE 8 Release Candidate to have updated getter/setter support and DOM prototypes
(Indexed 2009-01-14):
Im now pleased to announce that with the upcoming Release Candidate of Internet Explorer 8, we not only have a high-quality DOM prototypes implementation, but weve been able to change the getter/setter implementation to follow the draft ECMAScript 3.1 standard. While our JavaScript engine and DOM wont have support for all of the ECMAScript 3.1 [...]
ActiveRecord.js Released: ORM for Multiple JavaScript Environments
(Indexed 2009-01-14):
Aptana has put out their first beta release of ActiveRecord.js. The details according to Ryan Johnson, a developer at Aptana:ActiveRecord.js is an open source object relational mapper (ORM) that supports multiple JavaScript environments, including:Google Gears (client-side persistence)In Memory (if no SQL server is available on the client)Adobe AIR (client-side persistence)SQLite and MySQL (via Aptana Jaxer, [...]
Content visualization techniques and views
(Indexed 2009-01-13):
Noupe has another nice roundup, this time they are showing 10 Smart JavaScript Techniques For Manipulating Content.They share nice content views with demos and how to content. Included in the list is:jQuery pageSlide: jQuery pageSlide is a plugin for jQuery that slides the viewable webpage off-screen, revealing and populating a secondary interaction pane. It may [...]
YUI Compressor Online
(Indexed 2009-01-12):
Rodolphe Stoclin has created a simple Web wrapper on top of the YUI Compressor that let’s you throw up your JavaScript and get back a compressed version.It uses jQuery to do the inline results and show you the compression rate.
jsCron: Schedule code to run via simple JavaScript
(Indexed 2009-01-12):
Andrs 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:PLAIN TEXTJAVASCRIPT: // Funcin hola();function hola() { alert("Hola");} // Tarea programadajsCron.set("35 17 * * * hola()"); Of course, when doing this in a browser you aren't to be sure on timing, if the [...]
isArray: Why is it so bloody hard to get right?
(Indexed 2009-01-12):
PLAIN TEXTJAVASCRIPT: typeof maybeArray == "Array"; // erm, are you kidding? maybeArray instanceof Array; // maybe maybeArray.constructor == Array; // maybe typeof maybeArray.sort == 'function'; // closer Object.prototype.toString.call(maybeArray) === '[object Array]'; // ding ding ding A newcomer to JavaScript would assume that there is a simple way to see if an object is in fact an array. For the veterans out [...]
Forcing a UI redraw from JavaScript
(Indexed 2009-01-12):
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:PLAIN TEXTJAVASCRIPT: Element.addMethods({ redraw: function(element){ element = $(element); var n = document.createTextNode(' '); element.appendChild(n); (function(){n.parentNode.removeChild(n&...(truncated)... return el...(truncated)...
Palm gets its Mojo back?
(Indexed 2009-01-09):
The need is obvious for a cross-device mobile javascript library supporting iphone, palm, and android. blackberry browser still blows — Joe HewittJoe of course created the popular iUI framework that mimics the native iPhone look and feel and gives you nice simple iPhone features via JavaScript.Palm is on his list, because it is back in [...]
State of the Web 2008
(Indexed 2009-01-09):
John Allsopp has put together the data from his extensive State of the Web 2008 survey. In it you will find details on who was surveyed to set context, the browser / os usage claimed, and answers on the use of technology such as: Markup usageCSS and other presentation technologyJavaScript, Ajax, and the DOMFlash, Silverlight [...]
Web Workers update for Firefox 3.1
(Indexed 2009-01-07):
Ben Turner has nicely written up the state of Web Workers that we will see in Firefox 3.1 (in beta 2 right now).To show the latest, Ben got a demo working that decrypts Weave data in the client using a Worker:PLAIN TEXTJAVASCRIPT: // Launch the main worker. if (!worker) { [...]
Detecting twitter users with JavaScript - handy or evil?
(Indexed 2009-01-07):
Earlier this week I blogged about a proof of concept that you can detect if a user is logged in to twitter and display their data with a few lines of JavaScript. This could be used to show for example "tweet this" buttons in a blog application. The trick is easy: use the user_timeline to [...]
More Ajax Experience Videos: JSON and JavaScript
(Indexed 2009-01-06):
Following-up from our previous posting, we've got some more Ajax Experience videos. This post's theme is JavaScript and JSON:Advanced Animation & Physics in JavaScript with Paul BakausForget about Web standards and go way beyond the usual capabilities of Web scripting languages. Learn how to create stunning effects using canvas/svg/vml, how to control animated graphics in [...]
Special Offer for Ajaxian Readers: TheServerSide Java Symposium
(Indexed 2009-01-05):
Hello Ajaxians!We’re inviting all of the Java developers out there to an event organized by our sister site, TheServerSide.com, the Web’s largest enterprise Java community. As a member of Ajaxian, you save an extra $100 off the registration fee with the code AJAXIAN. (Register before January 16 to save a total of $400 and get [...]
2008: Awesome JavaScript
(Indexed 2009-01-05):
Jacob Seidelin has a really nice 2008 roundup of awesome JavaScript-yness that focuses a little on his own area of expertise (canvas whiz and all):2008 has been just great, not least because of all the great stuff people have been doing with JavaScript, the new canvas element and the web in general. Browser vendors are [...]
Extending WebKits Web Inspector a la Firebug
(Indexed 2009-01-05):
Alvaro Videla has a fun post on extending the WebKit Web Inspector with something a little strange.... a game: Alvaro walks through how to take some JavaScript/CSS/HTML and plug it into the inspector world (normally hidden somewhere like /Applications/WebKit.app/Contents/Frameworks/10.5/WebCore.fr...(truncated)... and adding panels (e.g. see the new game panel here:)PLAIN TEXTJAVASCRIPT: this.panels = { [...]
Why Load Testing Ajax is Hard
(Indexed 2008-12-31):
Today we are fortunate to have a guest post by Patrick Lightbody, most recently of BrowserMob fame (and previously Selenium work, OpenQA, WebWork, and more). Let’s listen in to him talk to us about load testing, and let him know your thoughts in the comments below: I’ve been developing and testing complex [...]
UniversalComet: Make any web page a Comet end point
(Indexed 2008-12-31):
How about if all you needed to do was:PLAIN TEXTJAVASCRIPT: var server = new Addressable.Server({ useGears: true }); server.onmessage = function (message) { log(message)} server.connect(function (id, url) { log("Connected. Messages will appear here.") $("#clientId").html("Client-Url: "+url) $("#testForm").attr("action", ...(truncated)...
Ajax Experience Videos: Performance and Security
(Indexed 2008-12-30):
Thanks to the folks at Adobe, we’ve got video of pretty much every session from the Ajax Experience 2008 that we can share on-line, free of charge. We’ll release them over the next week or so in batches. What better way to spend your New Year’s holiday than curled up with a laptop learning about [...]
Eeking out performance in script loading
(Indexed 2008-12-29):
Steve Souders has detailed the coupling of script loading with various asynchronous techniques with examples that show the timings that you can get. First he sets the scene:One issue with async script loading is dealing with inline scripts that use symbols defined in the external script. If the external script is loading asynchronously without thought [...]
mod_v8: Another Server Side JavaScript
(Indexed 2008-12-29):
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 dont really like being tied [...]
Playing with a fuzzy monkey; Helping JITs improve
(Indexed 2008-12-24):
PLAIN TEXTJAVASCRIPT: for (var i = 0; i <0x02000000; ++i) { d = 0x55555555; d++; d++; d++; d++; d++;} 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 the TraceMonkey team with [...]
Thomas Fuchs comes back with some JavaScript tips
(Indexed 2008-12-23):
Thomas has been busy working on freckle, but has jumped back onto his blog again to give us some short tips:Preventing console.log breakageWe have all been there. After a serious Firebug session, you forget to take out the console statements. Or, maybe you like to keep them in for the future. To be sure, you [...]
jQuery 1.3 beta: Sizzling and feature testing
(Indexed 2008-12-22):
jQuery 1.3 beta 1 has been released with John and the team asking for testing help.This is a big release as a lot has been changed:Sizzle has been integratedNo more browser testing: For example, no more if ( jQuery.browser.msie && !jQuery.isXMLDoc(this) ) { which is replaced with if ( !jQuery.support.noCloneEvent && !jQuery.isXMLDoc(this) ) {Live event [...]
Towards Better Reuse: Traits in JavaScript
(Indexed 2008-12-22):
From way back in 1987 comes a quote that summarizes how many feel about the state of object-oriented programming:Multiple inheritance is good, but there is no good way to do it.Joey Hurst wrote in to point us to his pet project--JSTraits--which aims to address this issue in JavaScript by providing an implementation of "traits". He [...]
jQuery Gestures
(Indexed 2008-12-22):
Adrien Friggeri has taken the music player ui and spent some time to create a really nice gestures library that allows you to add mouse gestures to a web page, supports complex (i.e. sequences of) gestures and provides visual feedback through the use of a canvas element.Example code looks like this:PLAIN TEXTJAVASCRIPT: // initialize the engine, [...]
Whatever? make sure your :hover works for everyone
(Indexed 2008-12-22):
Peter Nederlof just released version 3 of whatever:hover, his library that makes sure that :hover works just fine for the IE browsers out there.The new version is faster, better documented, uses a CSS trick with expressions in IE to trigger the hover events in IE and now has Ajax support! (this means that new items [...]
DLINK: automatic link annotation
(Indexed 2008-12-19):
David King has created a small JavaScript library dlink that styles your links to let the user know if the link is internal, external, a subdomain, an anchor on the same page, or an email link.To setup, you can simply:PLAIN TEXTHTML: <script type="text/javascript" src="http://oopstudios.com/dlink/dlink.js"></script&...(truncated)... use class=dlink --><div class="dlink">your <a href="#">link filled</a> content...</div> <!-- change sty...(truncated)...
DWR 3.0 near final release with RC
(Indexed 2008-12-19):
Joe Walker and team have announced the first RC for DWR 3.0. We asked Joe to tell us what is new:DWR now supports:varargsmethod overloadingtyped parametersbinary file upload/downloadit has a set of new types it can marshallDWR will let you use JavaScript to implement Java interfaces (e.g. to register a Listener interface to publish changes to [...]
Pixastic: JavaScript Image Manipulation Library
(Indexed 2008-12-18):
Pixastic uses <canvas>'s ability to expose raw pixel information to perform Photoshop-style image manipulation effects all in your standards-based browser. For an example of Pixastic in action, the library's authors have built a cute little Photoshop clone in a browser:Here's an example of using the underlying API:PLAIN TEXTJAVASCRIPT: var img = document.getElement("myImage"); // get the image [...]
FireUnit: JavaScript Unit Testing Extension
(Indexed 2008-12-18):
John Resig and Jan Odvarko have announced something pretty darn cool, FireUnit.FireUnit provides a simple JavaScript API for doing simple test logging and viewing within a new tab of Firebug.The example given shows the API nicely:PLAIN TEXTJAVASCRIPT: // Simple true-like/false-like testingfireunit.ok( true, "I'm going to pass!" );fireunit.ok( false, "I'm going to fail!" ); // Compare two strings [...]
Finally something to get a few more users off of IE 6?
(Indexed 2008-12-17):
We desperately want users to upgrade to the latest and greatest. A prominent and respected Web citizen recently said “With Ajax we are developing to 1997 technology, and are restricted by IE 6.” What if you didn’t have that nagging feeling, and instead could use the platform that sits below the clients of modern browsers? [...]
Ajax as Flash: Achmea
(Indexed 2008-12-17):
Remon de Boer sent us a link to Achmea.nl, a Dutch website that brought back memories of Thomas Fuch’s Ajax makeover of Gucci’s website some time ago.Ironically, Achmea.nl starts out by displaying a Flash-powered “Loading” graphic:But once the site loads, it’s all Ajax. Powered by YUI, the site sports animated roll-overs, smooth transitions, and otherwise [...]
Tech Luminaries: Interview with Brendan Eich
(Indexed 2008-12-16):
Dion and I have been wanting to do a podcast series for a long time that is more casual then Audible Ajax–just chatting with some of the luminaries in tech about their careers and such. We collected some content quite a ways back and have finally gotten around to releasing some of it over on [...]
JavaScript Raster Bar Effect
(Indexed 2008-12-16):
This is a fun canvas demo by Stefan Pettersson that brings you back to your Amiga days (if you remember those, or weren’t an Atari man).You can check out the JavaScript that makes the world turn.function start() { var resolution = 25; [...]
The Cloud Player: Web-based iTunes using jQuery
(Indexed 2008-12-15):
Eric Wahlforss, the founder of SoundCloud, wrote in to tell us about “The Cloud Player“, a iTunes / Songbird clone written entirely in Ajax:we just released an open-source itunes-clone built in jquery (and app engine, soundmanager 2, soundcloud api), complete with smart playlists, drag’n'drop, keyboard shortcuts, load-as-you-scroll playlists, playlist sharing, waveform display of tracks, etc. [...]
Extending jQuery selectors with JavaScript
(Indexed 2008-12-15):
PLAIN TEXTJAVASCRIPT: // Flag images upon load:$('img').load(function(){ $(this).data('loaded',true);}); // Extend expr:$.extend($.expr[':'],{ loaded: function(a) { return $(a).data('loaded'); }}); // Example of usage:alert( 'Images loaded so far: ' + $('img:loaded').size() ); Th...(truncated)...
Travians: Sims meets Cultures, with Ajax
(Indexed 2008-12-12):
Steve Mattison let us know about a new AJAX game has been released by the makers of that old popular PHP-based village building game Travian. This one is more like Sims meets Cultures, and it is called Travians:"Travians is a browser game in which you rise to the challenge ofeveryday life as a villager. This [...]
More JavaScript Inheritance; Prototypes vs. Closures
(Indexed 2008-12-12):
Steffen Rusitschka has a nice detailed post on inheritance with JavaScript, different ways you can go, and side effects of the decision.From,PLAIN TEXTJAVASCRIPT: var A = function(){}; // This is the constructor of "A"A.prototype.value = 1;A.prototype.test = function() { alert(this.value); }var a = new A(); // create an instance of Aalert(a.value); // => 1alert(a.test()); // => [...]
nib2cib: Use Interface Builder to design your Ajax apps
(Indexed 2008-12-11):
Tom Robinson has created an interesting new tool called nib2cib that could lead to you being able to use Interface Builder to create Ajax frontends.nib2cib is a command line tool designed for converting Cocoas nibs and xibs to Cappuccinos cibs. It is still very much a work in progress, but is a good foundation for [...]
SmartMarkUp: Universal Markup Editor
(Indexed 2008-12-11):
Joseph Woods of PHPCow sent us a note about SmartMarkUP, a “universal markup editor”:SmartMarkUP is a lightweight and powerful JavaScript library that allows you to turn any textarea into a fancy markup editor. HTML, CSS, XML, Wiki syntax, BBCode or any other desired markup language can be implemented and/or adjusted to your preferences and business [...]
Common Feature Tests
(Indexed 2008-12-10):
Kangax has written about his new Common Feature Tests project:I have been working on a little personal project of mine for the past couple of months. Its called CFT and stands for Common Feature Tests. Theres nothing really ground-breaking about it; CFT is simply a set of so-called feature tests for Javascript (or rather for [...]
You Leaked on my JavaScript!
(Indexed 2008-12-09):
As soon as I read John’s post on JavaScript Language Abstractions I knew that it would draw a lot of chatter and fuzz. John started with:Pyjamas, GWT, and Objective-J all hinge around a central concept: Abstracting away the authoring of JavaScript-heavy web applications by allowing the developer to program entirely in their natively language [...]
YUI Library, YUI Doc, and Github
(Indexed 2008-12-09):
Eric Miraglia and our friends at Yahoo! have announced YUI Doc, "a python-based documentation tool that generates API documentation for JavaScript code. YUI Doc was developed by Adam Moore, one of the principal engineers on the YUI project since its inception, to support YUIs API-level documentation."It is a comment-driven system in which documentation is parsed [...]
pyQuery: Same API, but with a snake.
(Indexed 2008-12-08):
jQuery came first, but then we have seen others such as pQuery.Now we have pyQuery which brings the same great taste API to Python. The author Olivier Lauzanne explains:yquery allows you to make jquery queries on xml documents. The API is as much as possible the similar to jquery. pyquery uses lxml for fast xml [...]
Massively parallel crowd sourced JavaScript app server; SETI for JS
(Indexed 2008-12-08):
Malte Ubl is having a lot of fun here :) He has created a "massively parallel crowd-sourced JavaScript app server cloud" a.k.a. SETI for running JavaScript code.This is how it works:When a user makes a request to the site...the request is handled by a Google App Engine application...that puts the request into a request [...]
JSOS: jQuery based desktop
(Indexed 2008-12-05):
There have been plenty of JavaScript desktop in the browsers of the years (ah WebOS!).James Luterek has posted about the latest jQuery based desktop environment.I started creating an operating system like user interface in JavaScript. I had intended to use it for the admin sections of my content management system(that runs this website), but [...]
Mozilla, Zazzle, and UIZE
(Indexed 2008-12-05):
Mozilla is big on tinkering–making things your own. They recently released a marketplace for their community to upload its own shirt designs. But because they based it on the Ajax-heavy Zazzle platform, consumers can customize the shirts in a variety of ways. We thought this made for a good opportunity to take a closer look [...]
CanvasTurtle
(Indexed 2008-12-04):
Eiten Suez, author of jMatter, has been up to some fun hacking recently. He just released CanvasTurtle a JavaScript and Canvas version of the old favourite TurtlePascal.You can build snow flakes with code like this:PLAIN TEXTJAVASCRIPT: function side(size, level) { if (level==0) { fd(size); return; } side(size/3, [...]
A great example of sharing; Sizzle Engine in Dojo Foundation
(Indexed 2008-12-03):
Voting has started in Dojo land to take in John Resig’s Sizzle next-gem CSS selector engine.This is incredibly exciting, as it shows how Ajax libraries are working together more and more. Instead of reinventing the wheel in different ways for each project, is it possible to find some core pieces that can be nicely shared? [...]
Decoupling data and UI layers with PubSub architecture
(Indexed 2008-12-03):
Marcus Westin (who we featured on finger print) gave a talk at the SF JavaScript meetup on a top that is very interesting:One common issue in my experience are intricate dependencies between the UI and data models. Decoupling these is a huge benefit with respect to maintainability. The PubSub model is a great way [...]
Implementing super in JavaScript
(Indexed 2008-12-02):
Erik Arvidsson seems to be having fun going through exersizes getting JavaScript to do something his way. The latest little foray is Using catch-alls to implement super.Firstly, catch-alls are the ability to use the SpiderMonkey only __noSuchMethod__ meta programming trick. The good news is that this seems to be coming to ECMAScript Harmony (I hope [...]
Kojax? Huh?
(Indexed 2008-12-01):
Mary Jo Foley has an article called Move over, Ajax. Here comes Microsofts Kojax. The thing is, I don't get what it actually is:Kojax is a mobile development platform, according to my sources, that will allow Microsoft- and third-party-developed applets run in an Ajax-like way, using a combination of Visual Studio tools and [...]
JavaScript Bra Size Calculator
(Indexed 2008-11-28):
Now this could only fly on a Friday ;)Ed Spencer has coded up a bra size calculator in JavaScript:One of the more mesmerizing websites I've worked on recently was for a lingerie boutique in the UK. Aside from the unenviable task of having to look at pictures of women in lingerie all day, I was [...]
Remote-ly Thankful
(Indexed 2008-11-27):
I realise that we are an international community here at Ajaxian, but for the American Thanksgiving holiday, I thought it would be OK to take stock and say some thanks too.Firstly, to the bright hackers who brought us not only XHR (thanks Microsoft), but porting it to other browsers, and then the hard work of [...]
Drawter: Visual Web based HTML tool
(Indexed 2008-11-26):
Damian Wielgosik has created Drawter, a web based tool to layout pages:Drawter is a tool written in JavaScript and based on jQuery library. It provides you the possibility to literally draw your website’s code. It runs on every single web-browser which makes it really useful and helpful. Each tag is presented as a layer you [...]
NetBeans Adds JavaScript 1.7 Support
(Indexed 2008-11-26):
Dion and I were just talking about NetBeans (Sun’s free Java IDE) with some colleagues the other day. To those in the Java community, just mentioning “NetBeans” can conjure up some of the worst memories of mounting file systems and purple-hued user interfaces.But in reality, today’s NetBeans is a fantastic IDE with a modern-looking interface [...]
Seadragon: zoom deeply in the world of Ajax
(Indexed 2008-11-26):
Bertrand Le Roy pointed me to Seadragon Ajax, a JavaScript client that gives you deep zoom (think: Google Maps) ability in short order.To build the thing itself you use Deep Zoom Composer and then you choose whether you want the Silverlight version or this Ajax one.The embed viewer is easy to use too.Seadragon.embed("400px", "300px", "http://seadragon.com/content/images/bike.dzi", [...]
Generating and Playing Sound in Javascript
(Indexed 2008-11-25):
Another experiment with sound, data: URIs, and the embed tag.SK has shown that it’s possible to generate wave file in Javascript and play it. All this happens in the browser and without requiring Flash. He’s built a sine wave generator and a song player.I came across a post about putting .wav files in data: URIs [...]
Interactive iPhone Console using JSCocoa
(Indexed 2008-11-24):
KUMAGAI Kentaro has created a JSCocoa based interactive console for the iPhone:Ive been struggling with transform property of UIView for long time. at last, Ive decided to create UIMonkey that allows to manipulate the variables by trial and error through HTTP in Javascript with SpiderMonkey. Few days after Ive started the project, I found JSCocoa [...]
Ejacs: Why you would want to a JS runtime in Emacs Lisp
(Indexed 2008-11-21):
I had to hold this back until Friday, because you will need some time to read Steve Yegge talking about his new project Ejacs:Ejacs is an Ecma-262 compliant JavaScript interpreter written entirely in Emacs Lisp. It should work in GNU Emacs versions 22 and higher.The parser and evaluator are ports of Brendan Eich’s Narcissus (JavaScript [...]
Memberkit: Another Shot at VB for the Web
(Indexed 2008-11-21):
Two years ago we covered JotForm, a Ajax-based web form builder. The folks behind it have been busy in the intervening time and have now released a more general tool: Memberkit.Three years in development, Memberkit lets youuse the drag and drop tools to create listing pages, display pages or search forms. You can create multiple [...]
Digg Attack: A Canvas Game
(Indexed 2008-11-21):
Fun news for a Friday. From Jacob Seidelin–the dude behind JavaScript Super Mario Brothers–comes Digg Attack, an original JavaScript game using <g;canvas> for visuals (and Flash for music).As an added twist, the game uses Digg to provide a sort of unique twist; enemies in the game are based on stories in the Digg API feed [...]
iPhone for JavaScript Developers
(Indexed 2008-11-21):
John has done a really good job at wrapping up information on the various options for JavaScript developers on the iPhone platform.He discusses the various approaches:JiggyApp: JiggyApp provides a full API for developing an application - apparently separate from most of the typical APIs. Arguably, though, the code ends up being relatively usable (jailbroken only [...]
CDNs Gaining Broader Use with JavaScript Libraries
(Indexed 2008-11-20):
YUI and GoogleMost everyone knows that Google has really stepped up to the plate by helping many JavaScript library projects host their builds on the Google AJAX Libraries API. Apart from providing a central distribution point for these libraries, the bandwidth cost savings alone go a long way in helping frameworks service there users in [...]
Liquid Canvas: Draw inside canvas with a DSL
(Indexed 2008-11-20):
PLAIN TEXTJAVASCRIPT: $(window).load(function() { $("#example").liquidCanvas( "[shadow border gradient] => roundedRect{radius:50}");}); This is an example of Liquid Canvas, a new library from Steffen Rusitschka who created ShadedBorder and RUZEE.Borders. Liquid Canvas is a JavaScript library which allows you to draw inside an HTML canvas element with an easy yet powerful description language.Automatic generation o...(truncated)...
Creating Custom Protocol Handlers With HTML 5 and Firefox
(Indexed 2008-11-20):
Via Myk Melez comes word that Firefox 3 supports HTML 5 web protocol handlers, which I had not realized before. These are really nifty:PLAIN TEXTJAVASCRIPT:window.navigator.registerProtocolHandler(...(truncated)... "https://www.example.com/?uri=%s", [...]
The Ajax side of AIR
(Indexed 2008-11-19):
AIR 1.5 has been released at MAX this week.For the folks that like to write AIR apps that at least have some JavaScript, you will be happy to see that WebKit has been updated:The version of WebKit included in AIR has been updated to a newer version. The updated version includes Squirrelfish, a new bytecode [...]
When generated JavaScript goes wild; JavaScript WTF in SharePoint
(Indexed 2008-11-19):
The JavaScript below was pointed out by Aaron Newton, and it comes from SharePoint. Jim Wilson said about it: "and we wonder why windows has 40 million lines of code."PLAIN TEXTJAVASCRIPT: function DeferCall() { if (arguments.length == 0) { return null; } [...]
Detect Ajax Framework with WTFramework
(Indexed 2008-11-18):
Because viewing the source is too bothersome, we now have WTFramework (short for "What The Framework", obviously), a bookmarklet that will detect and display the Ajax / JavaScript frameworks used in the current website.It does so by checking for loaded JavaScript objects for each framework, not by analyzing the <script> element URIs.Handy.
Fixing the Web, Part I
(Indexed 2008-11-18):
Over on my personal blog I've started a new semi-regular series called Fixing the Web. From Part I of the series:We've made major progress on the web since 2005 and the rise of Ajax. JavaScript toolkits like JQuery, Dojo, and YUI have expanded what we can do with web browsers and increased our productivity, while [...]
Trying to be private in JavaScript
(Indexed 2008-11-17):
Erik Arvidsson has an updated take on instance private, class private, package and friends.One thing that shoots out at you is actually at the end:Gmail was written without any true private members. We just use a naming convention.We love to focus on little geek things like encapsulation, but once again... you can write amazing, complex [...]
Become a member of Ajaxian
(Indexed 2008-11-17):
Did you know that as a member of Ajaxian.com, you canContribute news and become a part of the innovative future of Ajax and Rich Internet Application development?Post comments to discussion threads and share your insights with your peers?Receive focused email updates on the topics such as news, technical resources and announcement that matter to you [...]
Using UIWebView (WebKit) in your iPhone App
(Indexed 2008-11-14):
Dr Nic has shared his experiences using WebKit to implement part of your iPhone app (in his case SurfView):Negatives- (void)webViewDidFinishLoad:(UIWebView *)webView is slow. “Youre running an interpreter (JavaScript runtime) on top of a device with a small CPU and small memory. Go figure.”The JavaScript bridge does not appear to block the main thread. This is [...]
Guid0: JavaScript GUIDs
(Indexed 2008-11-14):
Our own Michael Mahemoff is at it again, creating a simple little GUID generator called Guid0:Guid0 is a GUID library for Javascript. Okay, it doesn't yet do official, bona fide, 128-bit, GUIDs yet, mainly for API design reasons. But this is a library you might find useful if you want to generate a unique ID [...]
Timing in JavaScript and browsers cant be trusted
(Indexed 2008-11-13):
This is officially the week of John. If he delivers top notch posts for the rest of the week he wins an Ajaxian award or something. Maybe we need to bring back the “pack of cards” where each card is an Ajax personality and John gets to be Ace of Hearts or something.I remember talking [...]
reglib: Another CSS based, declarative library
(Indexed 2008-11-13):
PLAIN TEXTJAVASCRIPT: reg.click("a.popup", function(e){ window.open(this.href); return false;}); /*ENGLISH TRANSLATION:I declare, forthwith, that all clicks on <a> elements withclass "popup" shall be handled thusly...*/ This comes from a new library that Greg Reimer of Sun has open sourced called reglib.He gives us the back story:Almost a year ago I made all kinds of big talk about releasing [...]
Dojo Extensions for AIR
(Indexed 2008-11-12):
SitePen has built an interesting set of APIs to enable you to create better JavaScript applications that run in the AIR platform:This new effort creates a new namespace, dair, making it even easier tocreate rich desktop apps using the Dojo Toolkit and Adobe AIR like theDojo Toolbox.The extensions offer convenience methods for your application, wrappingmany [...]
JavaScript Object Observability in ASP.NET Ajax 4.0
(Indexed 2008-11-11):
Dave Reed wrote in to tell us about an article he's written about Microsoft ASP.NET Ajax's utility for adding observability to JavaScript objects. The idea is simple:The Microsoft AJAX 4.0 preview includes this Sys.Observer class that allows you to be notified of updates to POJO's, provided you use its APIs to modify them.Sys.Observer provides a [...]
yboss - a wrapper for Yahoos BOSS API
(Indexed 2008-11-10):
BOSS - Build Your Own Search Service (the your is silent for reasons I cannot tell you as it would endanger the lives of our agents in the field) is a Yahoo! API to access their search index and get the data back either as XML or JSON. Whilst there is ample documentation available it [...]
Redshift: What Ruby and a nice API can do in the browser
(Indexed 2008-11-10):
Red writes like Ruby and runs like JavaScriptThat is the tagline for Red, and they mean it:The all-new Red is a Ruby-to-JavaScript transliterator backed by a custom ruby.js library designed to let your code run in the browser exactly* the way Ruby would run on your machine. The JavaScript output is optimized to contain only [...]
JX: Layout manager for jQuery
(Indexed 2008-11-07):
Santosh Rajan has created JX, which he calls a "Object Oriented Extension to jQuery". With that description, I was expecting something like Dean's Base library, but instead I found a layout manager for JavaScript with the following features:Only 8K minifiedTrue Objected Oriented jQuery ExtensionComplex layouts by nesting ContainersWhole application configurable'Custom event' driven programmingExtendable via Objected [...]
JavaScript Graph Plotting Tool
(Indexed 2008-11-07):
We've seen the community do a lot with <canvas> over the past few months, and every so often it's fun to see the good ol' <div> approach to graphics and animation.Tavs Dokkedahl gives us a good one of those with his JavaScript Graph Plotting Tool:As part of a larger animation framework I have created a [...]
Razor Optimizer: Runtime analysis of your Ajax code for optimization
(Indexed 2008-11-06):
Coach Wei has updated Razor Optimizer, “a JavaScript optimization tool for reducing code footprint and increasing runtime performnace. As a cross-browser web application itself, Razor Optimizer can be access either online as a service, or to be downloaded to run locally.Razor Optimizer is based on a new approach for JavaScript optimization called “razor”. While other [...]
MySource Mini: 2008s Fluxiom
(Indexed 2008-11-06):
Greg Sherwood sent us a link to a video showcasing MySource Mini, a web-based content management system with a super-sexy Ajax interface:A short demonstration of the MySource Mini showing some of the amazing new features that differentiate it from other CMS products:- True inline WYSIWYG content editing- Inline editing of complex asset types- Built-in graphical [...]
The Ajax Universe: Ben and Dion showcase the Presentation Randomizer
(Indexed 2008-11-05):
This was my favourite presentation of the year. Ben and I have given a lot of talks together, and to spice things up we created the presentation randomizer, a simple Ajax app that would sound a buzzer at random times. Why did we do this? When the buzzer went, we would have to instantly change [...]
Weed Out Obtrusive JavaScript
(Indexed 2008-11-04):
By now, most developers have (or should have) come to realize how important it is to build unobtrusive JavaScript code. Apart from ensuring a better user experience, today’s tools and libraries make it extremely easier to embrace this practice.Continuing down the path of providing developers good tools, Robert Nyman of DOMAssistant fame has updated his [...]
New Features, Docs for the JS Info Viz Toolkit
(Indexed 2008-11-04):
Back in May, we posted a story about “the other JIT”, the JavaScript Information Visualization Toolkit. Its creator, Nicolas Garcia Belmonte, has recently implemented a number of new features and has created a tutorial, some examples, and some documentation to describe them.The JavaScript Infovis Toolkit is a JS Information Visualization library that includes radial layout [...]
JSSpeccy: A ZX Spectrum Emulator in JavaScript
(Indexed 2008-10-31):
[via Simon Willison]A little bit of Friday JavaScript-craziness for you.Matt Wescott has created a ZX Spectrum emulator in JavaScript. The Sinclair ZX Spectrum was an old-skool PC from the 80s.Details:Readme fileRun JSSpeccy online (includes 10 classic games!)Download JSSpeccy (644Kb)JSSpeccy Subversion repositoryI especially like how Matt describes himself:Im really typecasting myself here. If there were an [...]
Kaazing Gateway: HTML 5 WebSock Server Released
(Indexed 2008-10-31):
Kaazing has released Kaazing Gateway, an open source HTML 5 WebSocket Server.The HTML 5 WebSocket specification is a standard that attempts to simplify much of the complexity around achieving bi-directional communications between browsers and servers. The specification provides a simple JavaScript interface that enables developers to open a full-duplex socket connection and connect directly to [...]
The Ajax Revolution: From UI responsiveness to functionality and beyond
(Indexed 2008-10-30):
This comes as part of the from my personal blog series…In recent presentations, Ben and I have been taking a look back on the rise of Ajax (where Ajax == popularity of dhtml :). At its core, I think it all comes down to UI responsiveness.When you look at the killer apps such as Google [...]
Debunking Dojo Myths
(Indexed 2008-10-30):
With the rich JavaScript library ecosystem, it can be extremely difficult to make informed decisions when choosing which libraries to use for your own projects. Because no one has time to analyze each library in detail themselves, such decisions are usually made by getting a feel for what the “street” thinks and making the safe [...]
Widgetplus: Server side Ajax widgets
(Indexed 2008-10-30):
Mikael Bergkvist has created Widgetplus, a gadget platform. He told us about it.XML RuntimeThe structure of an application is defined in XML.Its loaded into the serverside runtime like this: javascript:xin.app(' http://www.naltabyte.se/desktop/xin/demo/programs/basics.xml ');We get this as a result. (the test this link)Changes to the app remain persistent because on the server, the xml object has changed.Of [...]
How to structure your JavaScript code
(Indexed 2008-10-28):
Peter Michaux has shared how he structures his code these days, as he has settled on a pattern:The code example below is a simple little logger widget. It appends messages to a list and has a clear link to delete all the recorded messages.PLAIN TEXTJAVASCRIPT: // Wrap code with module pattern.(function() { var global = this; [...]
GameJS: Canvas Game Library
(Indexed 2008-10-28):
Tommy Maintz has created a fun project called GameJS a 2d game development framework using JavaScript and Canvas.The APIGameJS.framework.Game - This is the main game class you extend when creating the game. It has the following methods which you have to override: initialize, loadContent, update and draw. This is all very similar to the XNA [...]
A Patent On. The SCRIPT tag
(Indexed 2008-10-28):
I just stumbled across an interesting/scary patent (via JSONet). It looks like someone has tried to patent using the SCRIPT tag to invoke web services:The present invention permits a JavaScript-based Remote Procedure Call (RPC) to be executed from a Web page displayed in a Web browser window, without utilizing browser plug-in, Java Applet, or ActiveX [...]
Delaying JavaScript Execution
(Indexed 2008-10-28):
Matt has a nice post on delaying JavaScript execution in a way that waits for certain events to finish:If you're looking to execute javascript code whenever someone finishes (or stops temporary) scrolling, moving the mouse, or resizing the page, you may find the following segment of code useful.He shares the following boilerplate code:PLAIN TEXTJAVASCRIPT: var onFooEndFunc [...]
OpenAjax Alliance Announcements
(Indexed 2008-10-27):
The OpenAjax Alliance, an organization that has been working to promote more standardization among JavaScript toolkits and IDEs, held an InteropFest last week at the AJAXWorld conference.The OpenAjax Alliance has been focusing on two things:Ajax Developer Tools - The group has been working on creating a standard XML file format called OpenAjax Metadata. The goal [...]
CSSHttpRequest: cross-domain Ajax using CSS for transport.
(Indexed 2008-10-24):
XHR is so 1997. Now it is time for some CSSHttpRequest action, a device that allows you to run cross domain Ajax requests thanks to a CSS hack:Similar to JavaScript, this works because CSS is not subject to the same-origin policy that affects XMLHttpRequest. Like JSONP, CSSHttpRequest is limited to making GET requests. Unlike JSONP, [...]
A Peek Inside the W3C
(Indexed 2008-10-24):
I've long believed that the Ajax/JavaScript communities and the W3C should communicate more and have more awareness of what both camps are doing so we can work together better and get things done. In light of this, here are some updates on a special W3C meeting that is taking place right now. From October 20th [...]
Microsoft Live Labs Web Sandbox
(Indexed 2008-10-23):
The Microsoft Live Labs team has announced a new project: Web Sandbox. The team is lead by Scott Isaacs, someone who we owe thanks to, since he played a large part in the birth of dhtml (and thus, Ajax).The sandbox takes HTML, CSS, and JavaScript, and puts it in an isolated box. The goal is [...]
WysiHat: 37 Signals discuss new open source WYSIWYG editor
(Indexed 2008-10-23):
We recently discussed the bane and choice of rich text editors and we have a new Hat in the ring. WysiHat is a new editor based on Prototype from 37signals:WysiHat is a WYSIWYG JavaScript framework that provides an extensible foundation to design your own rich text editor. WysiHat stays out of your way and leaves [...]
Fronteers Conference Videos Available on the YDN Theater
(Indexed 2008-10-22):
The Fronteers conference recently held in Amsterdam featured a bevvy of top shelf speakers. Developers such as Dean Edwards, Stuart Langridge, Chris Heilmann and Tom Occhino, among others, discussed JavaScript, CSS, accessibility issues and more. Yahoo!, via the Yahoo! Developer Network, is hosting several videos from the conference and it’s definitely worth a visit to [...]
Form.Check: Great Form Validation for MooTools
(Indexed 2008-10-22):
Form validation is one of those problems that every IT developer has to deal with at one point or another. Form.Check is a MooTools plug-in library for dealing with client-side validation easily:And, it's very easy to use:PLAIN TEXTJAVASCRIPT: window.addEvent('domready', function(){ new FormCheck('formular', { display : { [...]
Peppy: New CSS 3 selector engine
(Indexed 2008-10-21):
James Donaghue has released Peppy, the first release of his CSS 3 compliant selector engine that runs independent of one particular library (and can thus be used with any of them).He has some bold claims on speed:As it stands now Peppy is faster1 than all other major JavaScript libraries with DOM querying capabilities (Prototype 1.6.0.3, [...]
TestMonkey: How appropriate
(Indexed 2008-10-21):
There are a lot of monkeys making appearances in the Ajax world. Tamarins, Greasey ones, Action monkeys, and now we have TestMonkey from the Appcelerator crew:TestMonkey is an open source (Apache License) UI test framework were introducing today. Its going to be fully integrated into Appcelerator (with some additional cool features on top if [...]
CSS Expressions are no more in IE 8 standards mode
(Indexed 2008-10-21):
PLAIN TEXTCSS: div.title { background-color: expression( (new Date()).getHours()%2 ? "#B8D4FF" : "#F08A00" ); } The CSS expressions of old will no longer work in IE 8. Whenever a feature goes away in IE, Ajax hackers get worried, as many hacks rely on quirks or proprietary features of the browser.Why did Microsoft choose this course?To comply with standards [...]
Great JavaScript and CSS Menu Libraries
(Indexed 2008-10-21):
Noupe is doing a good job cataloging content, such as their post on great JavaScript CSS menu libraries which features:Sexy Sliding Menu - Andrew Sellick decided to use mootools due to the smoothness of their effects, however, he developed a sliding menu using script.aculo.usFastFind Menu Script - This script allows for nested menus, based on [...]
Firefox 3 and XML
(Indexed 2008-10-20):
I’ve been delving back into the gnarly world of XML on the web lately and surprised to see what’s changed and what hasn’t. Coming up to speed on what’s new in this part of the Ajaxian world, I found a great article from IBM DeveloperWorks on what Firefox 3 brings to the table with XML. [...]
Letting off some steam for your Cappuccino
(Indexed 2008-10-20):
The 280 North crew continue to do good work with Cappuccino and Objective-J. We were fortunate to have Francisco Tolmasky speak at The Ajax Experience, and he has continued on a world tour on the subject. Below are some highlights from the Future of Web Apps in London:The crew has also been detailed some interesting [...]
jslibs - free JavaScript of browser limitations
(Indexed 2008-10-20):
jslibs is a way to use JavaScript on the command line using Mozilla’s SpiderMonkey. It provides wrappers for a lot of common libraries normally accessed through PHP or Python like image manipulation, packing or sound, animation and video through ogg vorbis and openGL. You also get access to SQLite Databases with a special wrapper.
Ajaxian Featured Tutorial: Building a JavaScript table grid application with TaffyDB
(Indexed 2008-10-17):
Back in March, we posted about Ian Smith’s newest project, TaffyDB, the lightweight JavaScript library that acts as thin data layer inside Web 2.0 and Ajax applications.Ian contacted us to let us know about a new tutorial that he posted which provides step-by-step instructions on how to best implement TaffyDB:TaffyDB extracts the “hard part” of [...]
Stitcho.com, an internet notification platform
(Indexed 2008-10-17):
Rusty Klophaus has launched Stitcho.com, an internet notification platform that works on both Windows and Mac (including support for Growl). "Using Stitcho, your website can send real-time noti?cations directly to a users desktop, even when their web browser is closed."Rusty told us:Stitcho is different from the other Javascript-to-Growl bridges that you have reviewed. It is [...]
Another look at JavaScript inheritance
(Indexed 2008-10-16):
Stoyan Stefanov of Yahoo! has published a nice article on JavaScript's class-less objects.This is published on JavaRanch, so it talks to the Java community, and uses that lense to explain the differences.He delves into:Constructor functionsFunction objects and prototype propertyInheritance via the prototypeInheritance by copying propertiesCrockford's beget object:PLAIN TEXTJAVASCRIPT: function begetObject(o) { function F() {} F.prototype = [...]
Jack: Mocking JavaScript the good way
(Indexed 2008-10-16):
Jack is a new JavaScript mocking framework coming out of Bekk in Norway. A lot of the RSpec talent is there too, so they know their testing!Jack features:Set expectations for number of calls and argument constraintsSpecify mock implementations for specific expectation scenariosCreate mock objects with a list of stub functionsReports expectation failures to test frameworks. [...]
OSGI and JavaScript; Frameworks and building blocks for Ajax apps
(Indexed 2008-10-16):
Bill Higgins of IBM Rational has written up some thoughts on componentization and packaging for Ajax applications based on work that his team did on the Rational Jazz platform.Some of what he built was:A nice component model based on OSGi bundles and the Dojo module systemRequest-time building of many fine-grained JavaScript files into monolithic files [...]
Firefox 3.1 beta: Geolocation, @font-face, Video and Audio, XHR++, and TraceMonkey
(Indexed 2008-10-15):
Isn't it great that a browser point release these days adds so many features? We are starting to see this from Firefox, Opera, WebKit and others, and it is exciting!The Firefox 3.1 beta 1 release has a slew of features that developers have been craving:GeolocationThe labs team got Geode out there, and quickly we have [...]
Say Goodbye to alert()
(Indexed 2008-10-15):
Blackbird, G. Scott Olson's JavaScript logging library, truly has a catchy slogan. The slogan "Say hello to Blackbird and 'goodbye' to alert()" definitely captures what the Blackbird library aims to do; make logging messages in JavaScript extremely easy. And setup is very easy. By incorporating the following lines of code, you've now added the ability [...]
Using JavaScript to make things work
(Indexed 2008-10-15):
An interesting top 12 list has been published, on using Javascript to fix 12 common browser headaches:Setting Equal Heights (jQuery example: $("#col1, #col2").equalizeCols();)IE6 PNG Alpha Transperancy supportChanging CSS Classes in JavaScriptBrowser selectors in CSS ($('html').addClass($.browser);)min-/max- height & width supportCenter Elements Vertically / HorizontallyDisplay Q tags in Internet ExplorerIncrease the size of click targets and get [...]
Ajaxians join Mozilla; Creating a Developer Tools Group
(Indexed 2008-10-13):
Today, we are really excited to be able to announce a big personal change. Ben and I are joining forces, full time, for the first time. What are we doing? We are joining Mozilla to create a new group with the charter to create developer tools for the Open Web.Mozilla is placing a big [...]
Ruby on jQuery and Closures
(Indexed 2008-10-13):
Sam Ruby has that way about him that sees things very clearly. He just took a peak at jQuery for the first time and was able to really put into words what I think jQuery enthusiasts like about the library:The notable thing about this is that despite all of the asynchronous events taking place, the [...]
Maintainable JavaScript videos are now available.
(Indexed 2008-10-11):
One month ago, the Fronteers conference in Amsterdam featured several “deep dive” talks on various web development topics. Stuart Langridge for example explained in detail what closures are and I talked about Maintainable JavaScript. The slides of my talk have been available for quite a while now and now Bachelor ICT have released the videos [...]
IE8 and Standards
(Indexed 2008-10-10):
Anne van Kesteren of Opera Software has updated his post on IE 8 to cover beta 2:XDomainRequest: Microsoft unfortunately continues with XDomainRequest rather than making changes to XMLHttpRequest as other browsers are doing and as is being standardized by the W3C Web Apps Working Group. (Disclaimer: I am the editor of XMLHttpRequest Level 2.) [...]
How does the scoping work with eval()?
(Indexed 2008-10-09):
Rakesh Pai wanted to understand scope issues with eval and found a few surprises.He started with the snippet:PLAIN TEXTJAVASCRIPT: var foo = 123;var bar = { changeFoo: function() { // We'll keep changing the following snippet alert(this); eval("var foo = 456"); // Changing [...]
