api - Broken Links Archive

JavaScript: The Selectors API

JavaScript libraries like jQuery and Prototype are amazing; flexible and powerful, they standardise processes and make cross-browser scripting really easy. I rarely work on a project nowadays where a library isn’t used.

Their ease-of-use has a slight drawback, however: it’s easy to rely on them too much, and lose sight of new developments in JavaScript. This was the reason for my not really paying much attention to an exciting recent introduction, the Selectors API, until I had cause to use it on a personal project.

Read the full article

My Name In Print

I hope you’ll forgive a little self-promotion, as I’d just like to play a few quick notes on my own trumpet. The latest issue of Net magazine is now on sale, and features a tutorial article, Create A Dynamic Content Panel, written by me.

In the article I explain how to build a dynamic Contact area, as we did on our recent redesign of Preloaded.com, using the Web Storage API and the BBC’s Glow Javascript library.

I’m not sure what the rights situation is with this article, but I hope that at some point in the future I’ll be able to post it here on my blog. But in the meantime, you can buy a copy of Net magazine in the UK at all good newsagents, as the saying goes (I don’t know if it will be in overseas editions also).

Printed TutorialPrinted TutorialPrinted Tutorial

On the subject of print, I’m also currently writing a book about CSS3 which should be published later this year. I’ll have more information on that nearer the time.

Firefox 3.6 uses the W3C File API

Last month the W3C released a working draft of the File API, which defines the basic representations for files, lists of files, errors raised by access to files, and programmatic ways to read files. The Firefox team have already implemented much of it, and have released a series of impressive demos on hacks.mozilla.org, which you can see if you have a recent beta of Firefox 3.6 (or a nightly trunk build).

The four demos shown to date display different (although related) aspects of the API, showing first multiple file uploads, then a drag and drop upload interface, next adding progress information (although this doesn’t work for me), then reading EXIF data from a JPEG image. You can imagine how these combined would be used for native drag and drop uploading to Flickr, for example.

The File API plays a big part in integrating the browser more tightly with the OS, particularly when combined with the drag and drop functionality, and I’m sure it’s only a matter of time until the other browsers implement this. Congratulations to the Firefox team for their work on this, and hacks.mozilla.org for some great demos.

Using the GeoLocation API

With the rapid growth of the mobile web, location-aware services are very much in-demand; the GeoLocation API was proposed to cater to this need.

Implementation is spotty at the moment; Firefox 3.5 supports it, as does Safari for iPhone (although not on the desktop, AFAICS). But it’s so simple to use, I’ve no doubt it will be adopted rapidly.

Read the full article

Visualising search relevance with Google charts

Some search engines, particularly on content management systems, give a percentage figure for the relevance of a result to your search term. When viewing a lot of results on a page, the figures can tend to run into one another and be hard to quickly distinguish.

This was the case with a client site I’m building using CMS Made Simple at the moment, and the results page suffered from a lack of clarity. Thinking of a way to simplify the page, I remembered the old adage “a picture is worth a thousand words” and hit upon the idea of using Google’s Chart API to replace the figures:

Read the full article

What I saw at @media 2008

As is customary (or as customary as ‘twice’ can be), here is a quick round-up of the sessions I attended at @media this year, with links to slides where available (which, as I type this, is pretty much unavailable).

Sessions which I found particularly interesting should be covered in more detail later, and I’ll update here as I find more presentations.

Read the full article


I’ve updated my Speaking page to include more conferences, more videos, and a little on my speaking requirements and preferences. I’m planning to cut down on the number of talks I give in 2014 (twelve is too many), but am always open to interesting offers and opportunities, so please get in touch if you’re organising an event.

[#] 1 Comment . More Asides.