InfoWorld has been all over this week's official launch of Android, the new smartphone platform from Google. With its slick interface and open application platform, Android shows every sign of giving Apple's iPhone a run for its money when the first phones begin shipping in late October.
As my colleague Tom Yager points out, however, "If you can't get coders on board, you're sunk." A smartphone that never expands beyond the capabilities that it shipped with is hardly worth the price. Smartphone vendors, like any OS vendor, must rely on healthy developer ecosystems to keep their platforms thriving and competitive. Apple has definitely succeeded in this area if the reports of big payoffs at the iPhone App Store are to be believed. Will Android be able to match that success?
Google released version 1.0 of the Android SDK to coincide with the product launch on Tuesday, while Apple has had an active developer program for the iPhone for some time. With real-world Android phones just a few weeks away, I decided now would be a good time to compare the development environments for these two platforms. Which is the smartest bet for developers?
Getting hold of the Android SDK was simple enough. It's available to anyone as a free download, provided they agree to a fairly straightforward license. Google offers prepackaged versions for Windows XP and Vista, Linux, and Mac OS X.
By comparison, developing apps for the iPhone requires a Mac -- and a recent Mac, to boot. The current version of the iPhone SDK only works on Intel-based machines running Mac OS X 10.5.4 or later. Even then, you can't download it unless you're an ADC (Apple Developer Connection) subscriber. The free membership level will do, but you'll still have to agree to a strict 10-page license before Apple will allow you to distribute any apps you create with the SDK.
For your trouble, you will get Xcode, Interface Builder, and Instruments, the same Apple proprietary developer tools that you'd use to write applications for Mac OS X. If you're accustomed to that environment already, this will come as welcome news. If you're not, there will be a learning curve.
The standard IDE for Android, on the other hand, is Eclipse, which has seemingly become the de facto development environment for just about every platform other than Mac OS X and Windows. Google provides a plug-in that does a good job of integrating the Android tools with Eclipse, including a software emulator to test builds of your apps.
If you'd prefer not to use Eclipse, however, you can actually perform most of the same tasks with command-line tools. This can be useful if you want to use automated build systems, such as ant. What's more, it leaves a path open for third parties to develop plug-ins for other IDEs; for example, Undroid is a beta plug-in that integrates the Android SDK with NetBeans.
Apple reins in developers
Eclipse works best as a Java IDE, so it's just as well that application-level Android programming is done in Java. But don't expect a stock J2ME implementation. Underneath Android's hood lie Google's custom Dalvik JVM and a set of core C/C++ libraries that provide "most of the functionality available in the core libraries of the Java programming language."
If that sounds uncomfortably nonstandard, however, it's nothing compared to Apple's environment. iPhone application UIs are built using Cocoa, the same set of frameworks used in Mac OS X. That means you'll need to learn Objective-C, a language that's used almost nowhere outside Apple. Apple did at one time provide access to the Cocoa APIs via a "Java bridge," but those bindings were ended in 2005.
Fortunately, both SDKs offer ample documentation, including tutorials to get you started. Google sticks mainly to plain text, while Apple goes so far as to offer actual training videos.
Incredibly, however, you don't just need an ADC membership to download the iPhone SDK; you actually need to be a member just to read Apple's documentation, which it considers "confidential material." And before you can view the training videos, you must first download them (for free) from the iTunes Store. Windows users, that means you'll need to install QuickTime and iTunes -- or just wait until after you've bought that Mac development workstation.
Even after your app is finished, Apple can impose additional restrictions. It reserves the right to reject your application from the App Store -- the sole distribution channel for iPhone software -- for various reasons, including duplicating existing iPhone functions, such as e-mail. The full terms of Google's forthcoming Android Marketplace have yet to be revealed, but it shows every sign of being considerably more flexible.
The mobile Web and beyond
By just about any measure, Google's Android is more open and developer-friendly than the iPhone. And yet, as of now, Google seems to have its work cut out for it. Based on raw market share alone, the iPhone seems likely to remain the smartphone developer's platform of choice -- especially when ISVs can translate that market share into application sales.
Sound familiar? In this race, Apple is taking a page from Microsoft's book, while Google looks suspiciously like Linux.
The question is: Will it really matter in the long run? Google isn't getting into the mobile phone market to be a developer tools vendor. It's hoping that it can advance the mobile Web platform far enough that it will become a viable stream of advertising revenue, the same way that Google has managed to monetize the terrestrial Web.
The iPhone and Android phones both ship with Web browsers based on the WebKit rendering engine. That means Web applications designed for one will render almost identically on the other, provided their developers adhere to published standards. Those same applications will also render on WebKit-based desktop browsers, such as Safari and Google Chrome, and on any other browsers that implement the standards correctly.
Based on that, all this talk of SDKs seems almost foolish. The iPhone may have more market share than Android today, but the standards-based Web has far more market share than both combined. So you tell me: If you're a developer, where's the smart money? The iPhone App Store? The Android SDK? Or somewhere else?