Coding with Jesse

Flash is our friend

Lately, I've been thinking a lot about Flash. My girlfriend wants to set up a web site. She wants it to act like a lot of her favourite web sites: Flash sites. At first, I wanted to explain to her why this is such an awful idea.. but I couldn't. I couldn't because I realised a Flash web site can be perfectly accessible if done properly.

Then, I saw the video player from YouTube and realised, it's perfect. It's perfect because users don't have to choose from Windows Media Player, Quicktime or Real. They just need Flash (and everybody has Flash). This made me rethink what Flash really offers. Here is a single plugin that opens up Video and Audio capabilities, even streaming and bi-directional. This alone is reason enough to welcome Flash with open arms.

If we use Unobtrusive Flash Objects (UFO), or some other JavaScript-based Flash deployment method, nobody can complain. We can deliver alternative content for those without Flash, the disabled and search engine spiders.

  • Decorative Flash can simply be replaced with an image
  • Flash navigation can be replaced with a list of links
  • For a whole Flash web site, we can replace it with the text, links and images in the Flash movie. It's better to split up a Flash site into pages anyway, or the swf file will get much too big.
  • For sound and video, we can possibly use a transcript, or links to the raw mp3 or avi files. Though, sometimes, it's just not possible to replace video. We can only try our best.

Flash can be a wonderful, powerful tool when used properly. It's important to treat flash the same way we do images. They can improve the experience for many of our visitors. For all others, including search engines and those with disabilities, we need to make an alternative available.

Published on March 15th, 2006. © Jesse Skinner

The Future Is Now

So what's next with the web? Will we see the next big thing come when CSS3 gets adopted? Will there be a revolution on the Internet when browsers support XHTML 2? No, of course not. These things might make life easier for us, but they aren't going to change what we can do right now. We already have all the tools we need.

Even XUL or XAML will just make things easier. They're not going to change what is possible. We can do anything right now using JavaScript, CSS, HTML and (for the really tricky stuff) Flash. We can communicate to the server in real time with XMLHTTPRequest or Flash Remoting. We can make complex interfaces that update themselves. Nearly anything that is possible in a desktop application, and so much more, is possible on the web.

So what does this mean? It means we're not waiting for anything except new ideas. Whatever the coolest, greatest new thing will be in 2010 will probably have been possible right now, if only we could have thought of it.

It's only our perception that changes over time. For example, Google Maps used technology that was there for years to do something very useful, and it pushed the limits of what we thought were possible in a web page. And it didn't take long for Microsoft and Yahoo to roll out their imitations. We could have had maps like this years before, if only someone would have thought of it.

It'll take some time to explore what other possibilities exist in the technology we have available. But there's no need to wait around. Let's see what's possible today.

Published on March 12nd, 2006. © Jesse Skinner

onAfterClick

Okay, some time ago I posted onAfterPaste, a way to run some code after pasting. You can actually do the same thing with any event. Let's say you want to put an onclick handler on a submit button, but you don't want the function to execute until after the form is submitted. You may want to close the window after launching a new window or submitting a form, but putting window.close() in the onclick would prevent the form from being submitted. Then, do this:

function onAfterClick (e) {
     window.close();
}

var submit= document.getElementById('submit');
submit.onclick = function(e) {
     setTimeout(function() {
          onAfterClick(e);
     }, 1);
}

That's it. It's like the browser processes the click handler, then goes and does it's default click behaviour, then executes the timeout function. So it's almost a kind of magic.. but not really. Anyway, setTimeout is a great tool for making things happen at the right time.

Published on March 10th, 2006. © Jesse Skinner

U.S. Grants Rich Internet Application Patent

The U.S. has granted a patent (via) to a design company, Balthaser Online, for Rich Internet Applications, including AJAX, Flash and Java.

Reading the abstract in the actual patent closely, it seems to me they've only patented the creation of rich applications from over the Internet. Their main product, Balthaser:fx, is used to create Flash movies over the web. This seems to fit my interpretation. However, the news article I linked to suggests the patent might include all rich internet applications.

What does this mean for the web? Who knows. It'll be up to this company, and the U.S. courts, to decide what this patent includes and doesn't. Nonetheless, I think this is another great example of why software patents are total bullshit.

Published on February 23rd, 2006. © Jesse Skinner

Google PageRank Updating

That's right, Google's Toolbar PageRank seems to be updating today. It seems really uneven though. Some pages are updated, others aren't. Perhaps it'll take some time to finish updating. Currently this site is still sitting at a PR2. Let's see what happens by the end. :)

By the way, you can see the different PageRank values with this Live PageRank tool. It'll give you an idea of how your pages are doing across different data centres, and compare Toolbar PageRank to "Live" PageRank. Good luck!

Update: Live PageRank is now a thing of the past. It is reporting 0 for every domain, and Matt Cutts doubts this will ever change. Well it was fun while it lasted.

Published on February 23rd, 2006. © Jesse Skinner
<< older posts newer posts >> All posts