Since the "The late 1970's", programmers have been striving to Write Once, Run Anywhere...
Sun Microsystems is one of the more notable players to tilt at that windmill. It's a noble cause, and one HTML5 and CSS are striving toward as well. Both often suffer from the need to Write Once, Debug Everywhere. Not exactly ideal.
One of the big advantages of developing rich internet applications in Flash is that you know it will look the same on Firefox as it does in Internet Explorer, Mac, PC, and even on Linux. You can pretty much build it once, and it works everywhere. Of course that means your viewers need to have the Flash plugin.
But the rise of mobile devices is changing the development landscape considerably. Even on the Xoom, the fanciest flagship Android tablet available right now, Flash just doesn’t play as well as it does on the desktop.
We tried to visit http://droiddoes.com/ today to see if their cool head-tracking 3D effect would work with the Xoom’s front-facing camera. No dice. First we had to turn on the debug option in the settings menu… to do this you type about:debug in the address bar (and hit Enter). Then you have to visit: browser settings > debug > UAString > Desktop. Instructions here.
After jumping through these hoops to keep from getting re-directed to the (tiny) phone version of the site, the Flash loaded but was clearly very broken, and the button to turn on the ‘webcam’ option didn’t do anything. In fact the viewing area went blank, unless we touched it and held our finger down. Not exactly what I would call a ‘build once, play everywhere’ experience. Here's a video of my attempt:
In all fairness, even my laptop struggles a bit with this processor heavy site. But since this was Flash, I had expected to get roughly the same experience… just a bit slower. Of course this wouldn’t even be an option on the iPad (1 or 2) due to the complete unavailability of Flash on iOS. (Not entirely true, but I am not allowed to jailbreak our iPad)
So what about WebGL? So far there is very limited WebGL support in the mobile space. As of this writing the Nokia 900 has WebGL (I don’t have one to test with, unfortunately), and Firefox on Android devices does too. We tried (the awesome) No Comply demo on the Xoom. It tried… it really did, and some of the graphics rendered, but it’s just not there yet. For laughs, we tried it on one of our Samsung Epic phones (android 2.2) and it ate all the memory on the phone, proceeding to close all other applications that were open.
Mr Doob’s Clouds did not render at all.
iOS does not yet have WebGL… and IE9 on the desktop looks like it never will. So how will we achieve the utopian goal of “build once, play anywhere”? Will we convince Microsoft to adopt WebGL? Will Apple play nicely with Flash like all the other kids? (Will hell freeze over?)
For now, it looks like we need to develop at least four pipelines for rich interactive 3d experiences. We will need a plugin for IE9 (maybe Molehill?) and HTML5 / SVG / WebGL for all the other modern desktop browsers. And of course, iOS and Android need dedicated code sets.
What do you think?
P.S. Thanks to Giles at Planet WebGL for the links (and the mention!)
Meanwhile, Microsoft is bringing us 'C3', an HTML/JS/CSS platform. No mention of 3d, unfortunately. http://www.zdnet.com/blog/microsoft/beyond-the-browser-microsofts-c3-next-gen-platform-for-html-based-applications/9282?tag=content;feature-roto
Posted by: Antonio Licon | 04/26/2011 at 03:56 AM