javascript

Flickr images without the API

jp.stacey 6 September 2006

A number of posts are currently in stasis waiting for me to actually finish them, but I thought it was worth mentioning the selection of my most recent Flickr photos that now graces my homepage. While the rest of that page awaits serious styling and content work, I’ve dilly-dallied by creating this bit of eye-candy.

Rolling feed on jpstacey.info

jp.stacey 1 October 2006

Following my recent success with putting a Flickr feed on my website’s front page is the conversion of this to an all-purpose feed reporter, where RSS/Atom flavour and feed specifics are dealt with by Javascript associative arrays of functions, keyed on both variables respectively.

How to write a Javascript file

jp.stacey 3 October 2006

Now I know the title sounds presumptuous, but there’s a certain methodology I’ve settled into that seems to work really well for encouraging Javascript that’s legible and safe. I thought I’d share it with anyone that doesn’t consider themselves a JS playa, in case it’s of some use to you too.

Who owns this node?

jp.stacey 16 October 2006

Firefox’s implementation of Javascript is quite forgiving: often a little too forgiving, when it ought to be strict about issues that could pose a security risk. Indeed, Firefox’s silent “the programmer meant this” in the instance I’ve just been tackling was only revealed by the IE error:

No such interface supported

Image manipulation in the browser

jp.stacey 6 June 2007

While Picnik gradually converts the functionality of desktop image processing software into online tools (in the hope, presumably, of being bought up by one of the big players), Flash has found other, more piecemeal uses in augmenting the image and font functionality of your average browser.

Programming shouldn't be degrading

jp.stacey 19 September 2007

Steve compares “graceful degradation” with “progressive enhancement.” Mostly he takes issue (rightly) with the rhetorical spin that the former applies to the idea of building a website. But I think you can compare them with each other as if they were two different types of crowbar instead: two ways of prising open the task in hand.

Insert any Javascript bookmarklet

jp.stacey 10 December 2007

As the natural extension of Gareth Rushgrove’s bookmarklets for inserting the Dojo or YUI Javascript toolkits mentioned by Simon, here’s a tidying-up of a bookmarklet I’ve been using to bring in any Javascript using user input via a popup prompt:

Insert-JS bookmarklet

Pretending that Javascript is XSL, part 1: XSL, CSS and JS side by side

jp.stacey 18 December 2007

There are three main technologies that your browser employs to present HTML for you: XSL, CSS and Javascript. The first two of these are functional: that is, they turn your incoming (X)HTML documents into a set of functions, or behaviours if you like. Because CSS isn’t generally considered a language, let alone a functional one, then it’s worth seeing an example in both languages. Here’s the CSS:

p.intro { color: green; }

And here’s a sort-of XSL equivalent:

Pretending that Javascript is XSL, part 2: jQuery++

jp.stacey 19 December 2007

If you’re here, then you probably came from here, and you want to make Javascript more functional. If you didn’t come from there—and this is getting a bit like a Choose-Your-Own-Adventure book, isn’t it?—then you might want to go there first, to see if you want to be here.

Pretending that Javascript is XSL, part 3: hCard to vCard

jp.stacey 20 December 2007

In previous posts (part 1, part 2) I established the possibility that there were advantages to making Javascript more functional, to bring it in line with CSS and XSL. I didn’t say what these were, particularly, but I then provided a few bits and pieces on top of jQuery to make Javascript just that: functional and quasi-XSL in its behaviour.