Infrequently Noted

Alex Russell on browsers, standards, and the process of progress.

...and the waiting starts

In Venezuela.

You might want to watch this Frontline episode for background.

Wombat

After trying nearly a zillion different shells on Windows, I'm back to Cygterm, in part because it makes cygwin happy and because I've just come to accept that some stuff will always require cmd.exe. Windows just sucks like that. On the upside, the Wombat VIM theme rocks my world.

Mark Thoma: "Tax Cuts Won't Build Schools"

Pro-cyclical arguments (the same ones that got us into this mess) are saying that we shouldn't begin public works projects because they might take a while. Mark Thoma shreds these them to little tiny bits.

I particularly enjoy how he notes that we've run a test of the "tax cuts solve everything" theory and how it's pretty clear that it failed. Miserably. While ballooning the deficit with nothing to show for it.

WebKit == Mobile

With the Pre/Mojo announcement, it's becoming clear that WebKit has mobile all sewn up. It bears listing who's betting on WebKit and where:

Apple
iPhone, Safari
Google
Android, Chrome
Nokia
Series 60 browser
Plam
WebOS
Adobe
AIR web runtime

From deep integration with the platform to being the platform, WebKit in various forms is how nearly every credible smartphone now "does" the web. The major outliers here are the WinCE devices, Blackberry, and whatever Sony's doing this week, but the writing is on the wall for them too. Mobile IE is a joke and the Blackberry succeeds in spite of its web experience. iPhone, Android, and Pre have raised the bar. The sucky-web center will not hold.

For a sizable chunk of the mobile browsers that a web developer would like to target today, that means that WebKit == Mobile. As predicted, the mobile world has beaten the desktop to the web of the future. It doesn't hurt that WebKit is making deep inroads into the desktop, either....but then you could reasonably assume that they pay me to say that.

So what does a WebKit-only world look like? And how portable are our desktop-web skills and tools? I did a quick set of experiments this past weekend to see how much of Dojo you'd still need and what we could leave behind. The results are encouraging. The headline numbers for dojo.js are roughly:

ShrinkSafe +gzip
Standard Build 79K 27K
webkitMobile=true 56K 20K
Savings 23K (29%) 7K (26%)

You can grab a copy of this pre-1.3.0 version here (webkitMobile.dojo.js).

The big size wins (in decreasing order) were:

  1. Moving to a QSA-only version of dojo.query()
  2. Being able to use intrinsics for dojo.forEach, etc.
  3. Dropping IE and FF-specific rendering, XHR, and style hacks
  4. Using a common closure wrapper for the entire core

And there's even more fruit on the vine. I think without too much more work I'll be able to drop the current animation system in favor of pure CSS animations and can significantly simplify the XHR code which doesn't do the straightforward thing to avoid terrible memory leaks on IE and very old versions of FF.

All of this points to where we could be if the browsers just got collectively awesome all of a sudden. That's the good news. The downside is that still leaves a lot of janktastic spec mistakes to be worked around at nearly every level of the platform. This experiment suggests that there is still a price to be paid just to get the platform to a usable state. If we look at the APIs of Dojo, Prototype, or jQuery as a set of suggestions for the APIs that the web should expose, then it becomes pretty clear that we've still got a long long way to go. But we can do at least 30% better in the short run, and I'm very glad of that.

My friends over at SitePen beat me to the punch on my own patches, but that's how it goes sometimes. Props to them for that.

Whoa.

Via Dion, Palm's new Mojo framework for the Pre is based on Dojo!

As far as I know, it was a total surprise to the Dojo community (myself included). I can't wait to get started writing apps for this thing and see what device APIs Palm has surfaced.