Today, there are more mobile devices than people in the world. That makes mobile development a very attractive target for the developers. An individual developer can reach millions of users at once by simply publishing an app. And the number of mobile users is only expected to grow in next few years.
While this puts a lot of power in a developer’s hands, it can be a little daunting to get started with the app development. It is no surprise that plenty of frameworks and libraries have popped up to make this task a little easier. This article aims to demystify different tools and technologies available.
Types of mobile devices
Mobile devices come in different shapes and sizes. Before we start developing an app, it is important to understand what kind of device we are developing it for. A drawing app wouldn’t make much sense on a phone due to its smaller screen. On the other hand, fitness tracking app is a bad candidate for tablets since users don’t run with a tablet strapped to their arm.
While there are no strict rules, the devices can be categorized into following segments:
Portability and one-handed operation are defining features of phones. Typically, a phone has screen smaller than 6 inches to accommodate for one-handed operation. Phones tend to have plenty of sensors (like accelerometers, compasses, etc.) that are otherwise absent in tablets. Cellular calling is also a unique feature of this segment. These features allow for innovative apps that depend on information like location, speed and direction of movement, orientation, etc.
Tablets are the devices with larger screens. The screen size may vary from 7 inches to 13 inches. Tablets generally lack a cellular radio which gives them a longer battery life. A large screen coupled with a long battery life makes this segment an excellent target for media apps. Smaller tablets closely resemble a typical book and provide a great reading experience.
Ultrabooks and Chromebooks
While these devices lean more towards a full-fledged computer than a mobile device, the boundaries are blurry. Chrome OS can now run Android apps. With advent of Universal Windows Platform, an app can run on any device ranging from a Windows 10 phone to a desktop. It is worth considering this segment while developing mobile apps.
This is a new class of mobile devices. Wearables mostly consist of smartwatches and fitness trackers. While many wearables need a host device (like a phone), some wearables can operate as standalone devices.
An IoT device usually has a very specific task. For example, a smart refrigerator may keep track of the stored milk and raise an order when supplies the are short. IoT devices offer a great opportunity for innovation.
Approaches to Mobile Development
This diversity in mobile space makes development challenging. In addition to different screen sizes and form factors, a developer must also account for operating systems, versions, etc. Fortunately, there are various tools, platforms, libraries and established practices to make this task easier. Let’s take a look at different approaches to mobile development.
This is arguably the simplest approach to mobile development. In this approach, an “app” is a website optimized to work well on a mobile device. Consequently, the app is accessible to almost any device with a web browser. No app installation is required. Moreover, any updates to the app are available to the users as soon as they are published. Web apps are great for a developer already familiar with web development.
However, all these perks come at a cost. Web apps tend to perform poorly as compared to the native apps. Moreover, it is difficult (or sometimes impossible) to use device specific APIs (like specialized sensors) in such an app.
This approach tries to balance convenience of web apps with features of native apps. Platforms like Apache Cordova and Ionic take web apps to the next level by providing access to device APIs like sensors, cellular calling, etc. These apps are bundled and distributed through app stores. To a user, these apps are indistinguishable from native apps. While this approach has a slightly higher learning curve, it is still a great option for web developers.
Just like web apps, hybrid apps may still suffer from poorer performance. While hybrid apps are usually distributed through the respective app stores, the user interface may look out of place for the platform since the same UI is used on different platforms. Frameworks like Ionic try to mitigate this issue by providing UI native styled UI elements.
Fitness training app Sworkit is a great example of a hybrid app.
Xamarin is a proprietary technology that can compile C# code into near native binaries. A developer can write their app once and produce platform native binaries for Windows, Android as well as iOS. Xamarin also provides an option to use UI specific to the platforms. This leads to a cohesive user experience. Since the code is compiled to the native platform, performance is on par with a native app. Xamarin is a great option for .Net developers interested in mobile apps.
Xamarin has significantly steeper learning curve. To provide optimal user experience, the developer must maintain different UIs for different platforms. In addition to that, debugging experience is slower due to cross compilation.
Native App Development
A native app is an app coded in programming language of the platform. This means using Java for Android, Objective-C or Swift for iOS and C# for Windows apps. This approach gives excellent performance and very high degree of reliability. New features introduced in a platform are available to native apps first. Wearables almost exclusively work only with native apps. So, apps that want to always make full use of latest features should take the native approach.
However, this approach requires expertise in different platforms. Skill-set of one platform doesn’t readily translate to another. Managing multiple codebases may get tedious.
For a developer interested in Android development from scratch, Udacity provides a great Android Developer Nanodegree Program.
In the article we looked at different options available to a mobile developer. There is no one correct way to do mobile development. While web works really well for simple apps that serve as a frontend for a service, native apps excel when it comes to performance. Developers must pick out the right tools for their need.