Further to last night's post on custom events, I've set things up now to use "magic event registration". It's a little like the auto-wiring facility of a dependency injection container. It's quite simple really - the app's initialisation sequence does this:
Register all components that might listen to something.
Register all events they might listen to.
For each [...]
[Read more →]
Tags: Ajax Patterns·Dependency Injection·Javascript·JQuery
"Script Island" is what I'm calling a design pattern I alluded to here. The pattern is to embed Javascript in your HTML like so:
PLAIN TEXT
HTML:
<script id="greeting" type="x-deferred-script">
alert("this is my script - it's eval'd on demand");
</script>
When the page loads, the browser should say "I don't know what 'x-deferred-script' is, and therefore ignore the concents [...]
[Read more →]
Tags: Ajax Patterns·Design Patterns·Javascript·Performance·Presentation
Around the time Ajax got coined, one of the already-known patterns was 37Signals' Yellow Fade Effect. As techniques were shared and visual effects libraries emerged, we began to see visual effects become commonplace on the web. I documented four of them in Ajax Design Patterns: One-Second Spotlight, One-Second Mutation, One-Second Motion, Highlight. (I wish I [...]
[Read more →]
Tags: Ajax·Ajax Patterns·Javascript·Patterns·Usability·Web
Why a Chameleon File?
While most browsers support SVG, IE's unique brand of interopability does not extend that far; even the latest and greatest, incarnation v. 8 of IE, has no sign of SVG. And so, we citizens of the innernets are left with two vector graphics formats: VML for IE, SVG for standards-compliant browsers, which [...]
[Read more →]
Tags: Ajax·Ajax Patterns·Chameleon·Experiment·HTML·Javascript·JOSH·Project·Web
Walking through Tiddlywiki source (write-up to follow), I noticed some interesting code in TiddlyWiki.js, importTiddlyWiki function.
The code takes a string and injects into an IFrame. I had talked to Jon a little while ago about a similar problem and was wondering about it ever since. The technique here looks like this:
It wraps the text with [...]
[Read more →]
Tags: Ajax·Ajax Patterns·IFrame·Javascript·Software·TiddlyWiki
We've done a little group exercise at the TOOLS web 2.0 patterns workshop. Designing a video website, with heavy emphasis on mashing up, e.g. show videos from youtube, grab recommendations from netflix, grab friend lists from Facebook, etc.
Here's the full feature list (click for full image):
And the design:
We eventually identified features, at back end and [...]
[Read more →]
Tags: Ajax·Ajax Patterns·Patterns·Web 2.0
It's belatedly dawned on me how OpenSocial makes a great server-less Ajax platform. When you create an OpenSocial gadget, you're building a lil Ajax app that performs much coolness that would normally require a server, but doesn't. Effectively, you're delegating the duties of the gadget's host environment. All you have to do is write a [...]
[Read more →]
Tags: Ajax·Ajax Patterns·Cloud·Gadgets·OpenSocial·Programming·Web·Web 2.0
Ajax, Ajax Patterns, Javascript, Server-Side Javascript
As server-side Javascript continues to gather momentum, patterns will start to emerge. Dual-side templating, which I'll explain below, is a pattern I've been harping on about for a while because you can kinda sorta use it already with a product like Rails. It will be a lot more powerful with [...]
[Read more →]
Tags: Ajax Patterns·Javascript·Links·Server-Side Javascript