Wednesday, October 24, 2007

Gosling: Kill The Multi-Billion Lame Ducks! My Turkey Rules!

James Gosling looks exactly as you'd expect a godfather of a programming language to look. But despite being an obvious candidate for "Serial killer or Programmer", he clearly has the geek skills - before joining Sun and working on Java he wrote a version of emacs and a multi-processor version of Unix. Just the kind of guy you want involved in your new cross-platform virtual machine-based language, but maybe not the kind of guy who should be dealing with real world nitty gritty decisions.

My experience of ultrageeks is they tend to be enamoured by cool technology and less interested in what actually works for the majority of users, and other boring constraints of reality. That's great for driving technology forward and produces all sorts of exciting innovations for the world to enjoy when they become mass-market viable, but equally it can lead to a lot of beautiful concepts which cannot win in the market.

Mr Gosling has decreed that JavaME is out and the new JavaFX platform is in. I've been meaning to post on JavaFX for some time and I guess this is as good a time as any, though I haven't enough free schedule to do it justice. Here's a quick summary of the platform:
  • SavaJE was founded in 1999 to create a JavaSE OS
  • In 2001 they managed to release v1 of the OS
  • In 2002 they announced a Smartphone version
  • In 2006 their concept phone won awards at... a Java Conference
  • In 2007 Sun bought the platform after they ran out of cash, and renamed it JavaFX
In that 8 year existence, as far as I can see SavaJE impressed a lot of geeks and won precisely zero phone contracts. Some would say that after 8 years, zero sales implies that either your sales guys & gals or your product are dead. Or you forgot to hire sales types, of course, but surely an investor would have pointed that out.

Interestingly, as a comparison, the first Blackberry shipped in 1999 and now they have a (loosely) Java-based platform used by 10m active subscribers in 2007 (having sold many more in the process). They started with an old Ericsson platform, but then SavaJE started with the existing Java platform.
Symbian spun out of Psion's EPOC platform in 1999 as well, hit 100m shipped devices in 2006, and is an OS that has run various flavours of Java since then. Only JavaME stuck though - it filled a useful niche which the earlier SE-based Personal Java failed to find (admittedly being deprecated didn't help).

JavaME has shipped on some number of billion devices (everyone seems to be coy with the exact figures), and I propose that it has done so because Sun have been very much a background player - the licence was flexible and cheap, the hardware constraints minimal and the potential advantage of having an open platform doing the sort of stuff JavaME does - basically games - was big enough to be worth the hassle. The other APIs added to JavaME have added a lot of capabilities almost by being implemented inside the games Trojan Horse, though the actual implementations and associated digital signature idiocy have been slightly farcical at times.

It's easy to see why Gosling, as a geek, looks at this and goes "Eeew, it's horrible, I want an uber-Java platform where I can mess with everything! Let's buy SavaJE and make JavaFX and the world will be saved!". It's the same kind of urge that is leading initiatives like OpenMoko, which will not change anyone's life - the people implementing it would have coded some other open source project if they weren't doing this one so the net cost to their earning and social life is nil, and no manufacturer will ever make a serious go at commercialising it so it will eventually die. Hopefully people screwing around with the alpha releases won't bring down too many networks for too long in the process.

Gosling wants to do away with the sandbox, do away with the constraints. Sadly they are there for a reason - because an app on a phone should not be able to have free rein to do what it wants. A big part of the future of mobile devices will lie in flexible scriptable UI layers, so in a way JavaFX does usefully recognize the future - but sadly the future will not feature JavaFX as the scripting engine of choice. It's too little too late.

If JavaME is a useful component on several billion phones, JavaFX is an OS (or a large part of one) looking for some hardware. By trying to sell it Sun moves from being an innocuous background player, friend of everyone (manufacturer and operator alike), to a competitor in one of the fastest moving and most competitive markets in the world. This is a pretty long way from Kansas for them, and they risk burning goodwill just as platforms like Flash Lite start to come close to enough market share to be relevant in what was JavaME's backyard.

The phone OS market is already awash with about a million players trying to rework Linux, plus Windows Mobile, Symbian, and proprietary OSs (Samsung seem to have dozens and Motorola now have MAGX, AJAR, ...). They all have their own UI layers. Operators are getting more aggressive, trying to simplify the situation with initiatives like Vodafone's plan to standardise on S60, Windows Mobile and Linux for future devices. Operators are the ultimate customers for device Manufacturers and they want fewer platforms, not more, and they won't start adding more platforms just because Sun wants them to.

Where does JavaFX fit into a market like this? I would say it will fill the same niche as it did when SaveJE owned it - winning plaudits at Java conferences run by Sun, and shipping in no devices. What happens to JavaME if Sun follow Gosling's advice through to the end and misinterpret the market so badly? Hopefully it'll keep shipping and keep being useful long enough to bridge us into a world where it works very well, or a world where we don't need it as there are better systems out there. The huge number of non-Sun JSR backers suggests this will indeed be the case.

If JavaME is a few billion lame ducks, then JavaFX is a single stillborn goose. I'll have the duck, thanks.