phones (arranged not by importance but rather alphabetically).
Most application sponsors, to quote Queen’s famous lyrics, will tell the developer: “I want it all, I want it all, I want it all ...and I want it now!” So the choice may be between throwing money at multiple parallel development teams, or adopting a cross-platform strategy.
Key Differences Between Mobile
Platforms
If you want to deliver your app across different platforms you have to overcome some obstacles. Some challenges are easier to overcome than others:
Programming Language
By now you will have noticed that most mobile platforms release their own SDKs, which enable you to develop apps in the platforms’ supported programming languages.
However, these languages tend to belong to one of a few families of root languages and the following table provides an overview of these and the platforms they are supported on:
BY
Going Cross-Platform 101 Language 1st class citizen¹ 2nd class citizen²
ActionScript BlackBerry 10, BlackBerry PlayBook OS (QNX) none C, C++ BlackBerry 10, Brew MP, Sailfish OS, Windows RT, Windows Phone 8 Android (partially, using the NDK), iOS (partially)
C# Windows 8, Windows
Phone
none
Java Android, BlackBerry,
Java ME devices
none
JavaScript BlackBerry PlayBook
OS, Firefox OS, Tizen, Windows 8
BlackBerry (WebWorks), Nokia (WRT)
Objective-C iOS none
Cross platform frameworks can overcome the programming language barriers in different ways:
— Web Technologies — Interpretation — Cross Compilation
Most frameworks also provide a set of cross platform APIs that enable you to access certain platform or device features, such as a device’s geolocation capabilities, in a common way. For
1 Supported natively by the platform, for example either the primary or only language for creating applications
2 Supported natively by the platform, for example either the primary or only language for creating applications
Going Cross-Platform 102
features such as SMS messaging you can also use network APIs
that are device-independent1.
OS Versions
Platforms evolve and sooner or later they will be version specific features that you want to leverage. This adds another layer of complexity to your app and also a challenge for cross-platform tools: sometimes they lag behind when a new OS version is released.
UI and UX
A difficult hurdle for the cross platform approach is created by the different User Interface (UI) and User eXperience (UX) patterns that prevail on individual platforms.
It is relatively easy to create a nice looking UI that works the same on several platforms. Such an approach, however, might miss important UI subtleties that are available on a single platform only and could improve the user experience drastically. It would also ignore the differences when it comes to the platforms' design philosophies: While many platforms strive for a realistic design in which apps look like their real world counterparts, Windows Phone's Metro interface strives for an "authentically digital" experience, in which the content is emphasized not the chrome around it. Another key chal- lenge with a uniform cross-platform UI is that it can behave differently to the native UI users are familiar with, resulting in your application failing to “work” for users. A simple example is not to support a hardware key such as the back key on a given platform correctly. Another challenge is the uncanny valley that results from mimicking native UI elements that look but do not work the same. Instead of mimicking native controls you
Going Cross-Platform 103
should either use non-native looking ones or just use the 'real deal'.
When you target end consumers directly (B2C), you often need to take platform specific user experience much more into account than in cases when you target business users (B2B). In any case you should be aware that customizing and tailoring the UI and UX to each platform can be a large part of your application development effort and is arguably the most challenging aspect of a cross platform strategy.
Desktop Integration Support
Integration of your application into devices’ desktops varies a lot between the platforms; on iOS you can only add a badge with a number to your app’s icon, on Windows Phone you can create live tiles that add structured information to the desktop, while on Android you can add a full-blown desktop widget that may display arbitrary data and use any visuals.
Using desktop integration might improve the interaction with your users drastically.
Multitasking Support
Multitasking enables background services and several apps to run at the same time. Multitasking is another feature that is realized differently among operating systems. On Android, BlackBerry and Sailfish OS there are background services and you can run several apps at the same time; on Android it is not possible for the user to exit apps as this is handled automati- cally by the OS when resources run low. On iOS and Windows Phone we have a limited selection of background tasks that may continue to run after the app’s exit. So if background services can improve your app’s offering, you should evaluate cross platform strategies carefully to ensure it enables full access to the phone’s capabilities in this regard.
Going Cross-Platform 104
Battery Consumption And Performance
Closely related to multitasking is the battery usage of your application.
While CPU power is roughly doubled every two years (Moore’s law says that the number of transistors is doubled every 18 months), by contrast battery capacity is doubling only every seven years. This is why smartphones like to spend so much time on their charger. The closer you are to the platform in a crossplatform abstraction layer, the better you can control the battery consumption and performance of your app. As a rule of thumb, the longer your application needs to run in one go, the less abstraction you can afford.
Also some platforms have a great variety of performance, most notably Android – Android devices range from painfully slow to über-fast.
Push Services
Push services are a great way to give the appearance that your application is alive even when it is not running. In a chat ap- plication you can, for example, send incoming chat messages to the user using a push mechanism. The way push services work and the protocols they use, again, can be realized differently on each platform. The available data size, for example, ranges between 256 bytes on iOS and 8kb on BlackBerry. Service
providers such as Urban Airship2 support the delivery across a
variety of platforms. In App Purchase
In app purchase mechanisms enable you to sell services or goods from within your app. Needless to say that this works differently across platforms. See the monetization chapter for details.
Going Cross-Platform 105
In App Advertisement
There are different options for displaying advertisements within mobile apps, some are vendor independent third-party solutions. Platform specific advertisement services, however, offer better revenues and a better user experience. Again, these vendor services work differently between the platforms. The monetization chapter in this guide provides more information on this topic as well.