Mittwoch, 29. Juni 2011

The insane world of programming for mobile devices

Yet another IT-revolution is happening now, the smartphones are becoming more and more popular and I guess nobody could predict the popularity of apps (well, except Steve Jobs maybe). One measurement how popular is a platform is the amount of available apps, another one, how easy is it to create apps for it. Just three years back, the mobile world offered following platforms:

PalmOS: Palm transformed its handhelds into smartphones, but all applications written for PalmOS could still be used.

WIndows CE: There were several versions of the mobile Microsoft OS, the apps for different versions were not always compatible, but could be adapted

Symbian: Coming from PSION devices the platform was highly optimised for mobile usage, though not easy to code for.

JavaME: Stripped down Java version was included on lot of featured mobile phones. Was good for games and simple apps, where the UI could be completely customised, but a horror to test on different devices and to certify the code. The expectation was that when the devices become more powerful JavaSE and JavaME could be merged as some point, JavaFX was also a hot candidate for the JavaME replacement, but it seems Oracle is not very successful in convincing the platform creators to include JavaFX in their environment.

With exception of JavaME all platform could be coded in C or C++. For JavaME there was a NetBeans plugin from Sun with all required emulators and debugging tools, Windows CE code could be written in Visual Studio.

Then the iPhone appeared on stage and nothing was the same as before.

iPhone did not run JavaME, iPhone did not run Flash, it had its completely new environment for mobile programmers, who had to learn C Objective and handle XCode. Nevertheless they followed Apple and created a stunning number of 300000 apps, which can be downloaded from the AppStore. The hype around iPhone and the lesson what a phone must have to become successful was learned quite quickly by the other platform creators, so they started developing own coding environments in hope that app programmer will use them and create a similar amount of apps for their platform.

Now the situation is that every modern mobile platform asks for a different language, different API, different coding environment:

PlatformLanguageAPICoding Environment
iOSC ObjectiveCocoa TouchXCode
SymbianC++Qt + SymbianQt Creator
MeegoC++Qt + LinuxQt Creator
AndroidJavaAndroid APIEclipse Plugin
Blackberry ClassicJavaBlackBerryOS APIEclipse Plugin
Blackberry PlaybookFlash, JavaScript, HTML5 Flash Creator
Windows Phone 7C#SilverflashVisual Studio
WebOSJavaScript, HTML5webOS API

Crosscoding between platforms is quite difficult, since not even MVC paradigm can help here, all parts of the code must be transformed in a different language, which is just as much effort as starting programming from scratch.

There are several attempts how to create an app, which works across several platforms:

- HTML5, JavaScript, PhoneGap - All platforms have powerful browsers, which understand a subset of upcoming HTML5 standard and JavaScript. So the idea is to have either an app which consists just of a web-view and a hard-coded internet address. The problem with this approach is that for using this app, the user must be online. Even if all the code is stored offline the second problem is that not all features of the device can be accessed by JavaScript, this is where PhoneGap and similar software step into the ring. They provide a JavaScript API which allows access to device features with JavaScript. Since the API is the same for all supported devices, apps which have been created using PhoneGap can run on different platforms.

- Flash - Adobe is working (marketing) hard to position Flash as a replacement for JavaME, i.e.. a platform which is available for a variety of devices with least common denominator (which is of course much higher than it was for JavaME). So far Flash is available for Android, Symbian, Meego, Blackberries new OS, but there is a compiler for iOS, which transforms Flash into a C Objective app. Probably Flash will be used for the same kind of apps as JavaME, for apps, which do not have to look like native apps e.g. games or fun apps.

But not only programming is different for each plattform, business models are also different, e.g. iPhone user are glad to pay small amount of money for an app, the Android apps should be better financed through ads. The procedures of app-signing, of reviews by AppStore owners, of becoming a publisher in an AppStore, of the policies for an app are all different. All this means that creating apps for different plattform is each time a business decission, which must be reviewed carefully, if it makes sense to support this or that platform. It is not just about going mobile, but going mobile on which platform.

So far there are two clear winners in the app race, this is iOS and Android, with 300000 resp 100000 available apps. But nothing is as fluid as mobile app market. Nokia is still the number one smartphone seller, after bringing Qt on their platform it is possible, that lot of Linux-savvy programmers will be attracted by Meego. Never underestimate the marketing power of Microsoft and Ballmers call for developers. The company behind Android, Google is having hard time from being sued by Oracle for violating patents Oracle has purchased with Sun IP properties. So in half a year the numbers might look completely different and a new competitor can suddenly arise from nowhere. This means that the developer must be prepared to be forced to learn new language and new API. The best thing for them would be if a consolidation would take place to 3-4 platforms and powerful JavaScript/HTML5 API which allows cross-platform programming in one language.

Keine Kommentare:

Kommentar veröffentlichen