Monday, April 12, 2010

Mobile Computing Growing Pains

The experts have been saying for years that the future of computing is in mobile devices. I ignored them until recently, but now the iPhone, iPad, Kindle, and similar gadgets have gotten my attention. I own an iPhone myself, and I’m beginning to see the potential of mobile platforms for some of my own creative projects. These projects might include textbooks, educational software, and perhaps a trail guide to the local area.

I’ve already written about some of the challenges in delivering a textbook or trail guide on a mobile device. But perhaps the biggest challenge facing any of these projects would be the diversity of competing mobile platforms, and the fact that only a minority of the potential audience owns any one of them.

The obvious solution is to create content in a cross-platform format. This is trivial for a book whose formatting doesn’t matter. But a versatile and attractive electronic format for physics textbooks doesn’t seem to exist, so some custom, platform-dependent coding would probably be required. A good, practical trail guide would require much more coding. And a decent interactive simulation of molecular dynamics or the night sky requires a thousand or more lines of user-interface code.

For several years I’ve been writing these kinds of simulations in Java, which makes them portable to virtually all of today’s desktop and laptop computers--and deliverable over the web. I can’t overstate what a huge advance this is compared to the bad old days when you had to write native code that would run on only one platform. (The native Mac simulations that I wrote between 1985 and 1992 were never widely used, and now they don’t even run on the new Macs.)

Unfortunately, mobile devices don’t run Java applets. Apple’s mobile devices don’t support Java at all. I’m not absolutely wedded to Java, but I’ve been hoping that some kind of usable cross-platform development environment for mobile devices would soon come along. Last week my hopes got a major setback.

Apple has now added the following sentence to its iPhone developer license agreement:
Applications must be originally written in Objective-C, C, C++ or JavaScript as executed by the iPhone OS WebKit engine, and only code written in C, C++ and Objective-C may compile and directly link against the Documented APIs (e.g., Applications that link to Documented APIs through an intermediary translation or compatibility layer or tool are prohibited).
The geek blogs are all abuzz over this new rule, and rightly so. It seems to prohibit virtually any sort of cross-platform development tools, and even restricts what programming languages you can use to develop iPhone apps. Bloggers are inferring that Apple isn’t merely trying to maintain the quality of apps; it’s literally trying to make life difficult for any developer who wishes to deploy an app on multiple mobile platforms.

For a part-time, half-assed developer like me, this move by Apple is devastating. I write software not to make money but to reach a target audience. I have no intention of writing software that can reach only the fraction of that audience that owns a particular device. And I don’t have the time or the resources to port software from one device to another.

Eventually, I suppose, the situation will improve--just like it improved for personal computers when Java came along. Until then, I’ll keep deploying physics simulations as Java applets for personal computers. And I’ll keep publishing books in the tried-and-true format that’s universally readable by all.

1 comment:

  1. To follow-up on this hastily-written post...

    I've looked a little further into HTML5, and if I'm understanding it correctly, it holds quite a bit of promise for the creation and delivery of book-like content in a way that's platform independent. To work for physics books, of course, it'll have to incorporate MathML, which my Safari browser doesn't yet support. And for simple simulations and animations, the "canvas" element may suffice. Here's a great example that runs fine under Safari on my Mac, but extremely slowly on my first-generation iPhone. Will "canvas" ever be able to completely replace the kinds of Java applets I've been writing? Perhaps, but it seems like that day is still a long way off.

    Meanwhile, Steve Jobs has posted a lengthy and defensive explanation of Apple's policy, framed specifically as an attack on Flash. I've never developed in Flash; I instead want to know why Apple's mobile devices won't support Java applets. The openness argument doesn't seem to apply to Java, and many of Jobs' other arguments don't seem to make sense at all, since they would apply equally well to html/css (e.g., rollovers) or to the canvas element (performance, battery life). The bottom line seems to be that Apple doesn't want to support good-quality web-delivered apps, because they want you to get these through their app store. Their strategy will work if an only if they can convince most developers to create custom, stand-alone apps.

    Apple's competitors therefore have a golden opportunity here: They can choose to support Flash and/or Java in their mobile web browsers, and thereby offer their users access to a lot of additional web-delivered content. Let's hope they succeed, and thus pressure Apple to be more reasonable.

    ReplyDelete

Not registered? Just choose "Name/URL" and enter any name you like; you can ignore the URL field.