Archive for the 'Ajax' Category

Less complex ECMAScript

Ajaxian today reports that the latest version of the ECMAScript 4 grammar seems to have tightened up the language and reduced it’s complexity somewhat. Ajaxian quotes Brendan Eich:

ES4 has overspent its complexity budget in order to explore a large design space. It is now shrinking to meet practical budgets involving Ecma member consensus, prime mover commitments, fatigue effects, community expectations, and the like. No one working on ES4 wants it to be like Perl 6. We aim to finish this year.

This is great news in my opinion. I liked the idea of tail calls, but frankly, the last version of ECMAScript 4 looked like they tried to include every feature of every other current language. The language was getting overwhelmingly complex and I hope that they have axed a significant part of the new features before the final version.

The Failure of CSS

By way of Ajaxian I came across a post by Alex Russel on the failure of CSS and how CSS 3 just doesn’t solve any real issues. I can’t tell you how glad I am that for my career as a web developer chose Flash and Flex instead of the Ajax path. One large contributor to that choice was my disappointment that CSS never actually made layout for the web any easier.

Read the rest of this entry →

Workload widget for Billings

Workload widget icon

Billings, Marketcircle’s excellent time reporting and invoicing application, was updated to version 2.5 the other day. If you look at the Billings website you can find the same icon as on this page, it’s the icon for my Dashboard widget Workload, which is a Billings companion showing you how much you’ve worked the past week.

If you are a Billings user, I recommend that you download the free update to 2.5, and if you do, why not try my widget as well. You can download it here, or from the Billings website.

Read the rest of this entry →


Firebug - Web Development Evolved

FireBug is one of the best tools I have used. Web development without it wouldn’t be the same. It’s been really really good for quite a while now, fantastic even, but there has been one feature missing, an activity monitor which shows how images and files load, like Safari’s Activity Monitor. The latest version has one, and it’s sooooo much better than Safari’s, showing timings both in numbers and graphically. It also has a profiler.

What can I say, one of the best tools (rivaled only by TextMate) in my web development toolchain just got a lot better. From the top there is no way but down, but not for FireBug.

Why on earth isn’t there any tools like this for ActionScript development?

Flash, Ajax and Google Analytics

Flash and Ajax applications don’t register in the server logs as the good old HTML-based websites did. I’ve hacked my own solutions to this, because it’s always interesting to know what visitors are doing, how many they are and what the find interesting.

To get server logs of a Flash or Ajaxified site, create a file on the server and load that file with a different parameter for every “page” you want to track. I put “page” in quotes since what consitutes a page isn’t always entierly obvious in the context of Flash and Ajax.

But, over the last year I have started to use Google Analytics, which is a rather good tool for getting an overview of your site’s statistics. Today I looked through the documentation and found a page named “How do I track Flash events”. It’s not rocket science, but I thought I’d share this knowledge with you.

It’s as simple as including the analytics JavaScript-snipplet as usual on the page that embeds the Flash application, and then call the tracker code from within Flash, Google suggests this code:


You can do it with the ExternalInterface, too, but the code above works fine.

I’m thinking of expanding my state handling class into a small module which provides different kinds of state handling, and something which automatically calls a server side script or the Google Analytics tracker code would definitely be included.

Animation done right

I’m a huge fan of MochiKit, and I have, on more than one occasion mentioned that the guy who wrote it (Bob Ippolito) has more brains than the whole Flash development team put together.

Now, someone has created an animation library on top of MochiKit, called MochiKit.Animator (what else?). I’m a little confused as to the relation between it and MochiKit, and who the author is but that’s not a big issue at this point.

What can I say? This library is animation done right. I don’t shop around for ActionScript animation libraries very much, because the first time I did I cried at the state of things. Using the Tween class makes me cry every time.

Why, why, why are there no developers like Bob, or the author of MochiKit.Animation writing things in ActionScript? Flash and ActionScript have so much potential, and it’s wasted on you lot.

Thank you Adobe

Adobe has given away the ActionScript 3 runtime to Mozilla, to be made into the reference implementation of ECMAScript 4 (JavaScript 2):

Adobe Systems Incorporated (Nasdaq:ADBE) and the Mozilla Foundation, a public-benefit organization dedicated to promoting choice and innovation on the Internet, today announced that Adobe has contributed source code for the ActionScript™ Virtual Machine, the powerful standards-based scripting language engine in Adobe® Flash® Player, to the Mozilla Foundation. Mozilla will host a new open source project, called Tamarin, to accelerate the development of this standards-based approach for creating rich and engaging Web applications.

Read the whole press release, or perhaps a more developer friendly explanation from Kaourantin’s blog.

While this doen’t mean they have given away ActionScript 3, since the API:s and the compiler are not included, it does mean that Flash, Flex and Ajax applications will be able to share a code base in the future. That is, if Internet Explorer will ever support JavaScript 2.

Speed up that loader!

I hate loading animations and try my best to program my Flash sites so that loading is done in the background or at other times when the user will not notice very much, only when I absolutely have to (which is, I must admit, all too often) I throw up a loading animation.

I have noticed that it’s not so much the size of the things I load as the number of things that plays in to how much time the loading takes, which is, among other things, explained in this article on Ajaxian (it’s based on another article which you can find here: Optimizing page load time).

And yes, what Ajaxian has to say applies to Flash and ActionScript, and in this case very much so since Flash applications don’t have the luxury of being auto-layouted during loading as HTML is.

Bookmarkability in Flash

Using the external interface, and a simple JavaScript, you can make your Flash applications bookmarkable, and also accidental-reload-safe. In this article I’ll show you a simple and minimal way of doing it.

Read the rest of this entry →

Ajax seminar

I held an Ajax-seminar for the Swedish software consulting firm Teleca last wednesday, and it went quite well. I thought I should share some of the things I talked about.

Read the rest of this entry →