by Aaron Schlesinger, Senior Software Engineer at StackMob
Developers choose to build for iOS first because Android development demands more resources. Developers have to build apps for a wide variety of hardware, OS versions, and a new Java runtime.
But we all know Android’s market share is big and getting bigger — so why not embrace it? We can capitalize on the improvements being made in the developer ecosystem and give users what they want: native look and feel, performance, and feature integration.
All we need to build quality apps is good planning and a deep understanding of the ecosystem.
Android is continuously improving and it is still possible for small teams to build high quality apps. First, Android fragmentation is less of a problem than it first seems. Since 25 percent of all 500 million Android devices run Jelly Bean 4.2 and 4.3, you can still reach 125 million devices fairly simply. You can avoid multi-OS testing and you can use the latest APIs, without having to build fallbacks or workarounds.
Also, the technical community matures as fast as the user base grows. Google and others are releasing and improving official SDKs for their services, and a growing developer ecosystem is producing rich Android libraries for common tasks.
The Android core library is well documented with guides, references, and how-tos, and most importantly the IDE and packaging system recently got a big boost with Android Studio and Gradle.
Taking Advantage of Recent Improvements
These core improvements enable higher-level abstractions. There’s likely a library that does what your app needs. Rely on stable libraries so you don’t have to do the system/integration testing yourself, and focus on libraries that are used in existing Android apps.
Beyond libraries, use the familiar model-view-controller (MVC) pattern for your app’s design. Just as in iOS apps, the separation between components will help with concurrency, performance and code organization.
Going Further: Using the Server
Now is a good time to move your app’s data and some of your app’s logic to the server. You’ll end up with less logic on the client, easy ability to build other apps on other hardware or platforms, and most importantly a smaller app footprint. Move more code to your server where you have tight control over the OS, runtime and hardware, and you’ll have less to test in your app.
Fragmentation is here to stay, and as Android makes its way into new hardware, it will grow, but our tools will improve also. Use existing libraries when you can, build your app using the MVC pattern and put your data and core logic on the server. These tools are here to make your apps smaller and easier to build for more platforms.
Before StackMob, Aaron worked at Zynga building some of their biggest backend systems for their games, supporting millions of concurrent users and hundreds of millions of users in total. Before that, he worked at Microsoft building the Mac Office suite of applications, during which he built a new distributed testing infrastructure for automated testing.