Android and iOS are the two obvious leaders in mobile operating systems. But, according to App Annie, despite Google Play Market having twice as many downloads, Apple’s App Store delivers 75 percent more revenue. The takeaway is, introducing an app that covers only one platform means losing not only a big part of the revenue but also the potential audience.
However, crafting two native apps simultaneously could be even more wasteful, despite all the perks of native development. Besides, what if you decide to cover Windows Phone and Blackberry devices as well? Creating only one app that can run on all platforms seems to be a far better option. But is it?
We have already raised this issue in our 5-step guide for choosing the mobile development approach. It’s time to shed some light on the technologies behind each of the approaches.
But first, let’s quickly summarize the three approaches we’ll discuss today.
Native development implies the use of platform-specific programming languages, software development kits, development environment, and other tools provided by the OS vendors. As a result, building native apps for several platforms requires you to employ separate technology stacks.
With both hybrid and cross-platform solutions, you write the code once with the main difference in the rendering method.
Hybrid uses WebView — platform-specific components used to display web content directly inside an application instead of a standard browser (Safari or Chrome). This way, just as each operating system displays each website the same, the apps will run comparably on all devices. To create a native-like interface for every platform, you can use technologies like PhoneGap or Ionic, which we’ll explore further.
Cross-platform takes a different route. Tools like Xamarin, React Native, or NativeScript take each element of an app and adapt it to each specific platform, ensuring not only maximum customization but also improved performance compared to hybrid. We’ll talk about the approach and some of the most popular solutions later.
You should keep in mind that the distinction is most noticeable when it comes to cost, user experience, and performance. So, whichever way you go, these aspects will certainly affect your choice.
Now, let’s start from the standard concept — native app development.
Native App Development
As we mentioned, if you want to create native apps for several platforms, be ready to follow at least two different procedures. For example, the basic toolset for iOS and Android development is as follows:
Native apps can use 100 percent of the features available for a specific OS and corresponding devices. They usually perform better and enable completely custom, platform-specific UI implementation — any nonstandard interface element or complex animation can be created using native tools. This makes this approach perfect for consumer-facing app development. However, to create a native app for each platform, you need separate development teams to code for iOS and Android.
Development for Apple’s iOS requires using Objective-C, or Swift, or both languages in combination. Applications are written within Apple’s integrated environment Xcode, which supports source code for Swift, Objective-C, Java, and the set of other programming languages. It also includes Interface Builder, editor extensions, an error alerting system, and a complete documentation.
The popularity of Objective-C vs Swift over the last 12 months
Since the introduction of Swift in 2014, use of Objective-C as a language of choice started to decline. Swift has quickly earned a loyal fanbase with new guides, documentation, and even educational video games suggested by the community. Its compactness is another big plus — for example, Lyft was completely rewritten with Swift, which reduced the number of code lines from 75,000 to 22,000. For a thorough review of the language, check out our article on Swift pros and cons.
However, the fact that Objective-C is still brought up in the conversation means that there are some arguments in its favor. Most of today’s apps are written in Objective-C, for years it’s been the only programming language for iOS development. Since the iOS SDK has been written in Objective-C as well, you’ll have to interact with Objective-C components even if you choose Swift. So, despite Swift being a replacement for the older language, Objective-C is still a force to be reckoned with.
Android apps are developed in Google’s Android Studio environment. Unlike XCode, it runs on Windows, Mac OS, and Linux. Android Studio offers a wide range of functionality, Lint code analyzer that helps detect performance issues or version compatibility, and built-in support for Google Cloud Platform that allows you to integrate Google Cloud Messaging and App Engine services.
Java, of course, is not the only language for Android native development, but it’s obviously the most popular. Thanks to its respectable age, Java has exhaustive documentation. It’s considered one of the easiest languages, plus its great networking capability allows developers to work together via more than one computer.
Kotlin is a newly adopted language that Google began to support became officially in May 2017. Being an open-source project prior Android’s announced support, it built a community around itself and has been put to the test by Pinterest, Uber, and Netflix among others. One of the main benefits of Kotlin is that its adoption is low-risk: You can convert it to Java in one click, use any Java frameworks and libraries, and it can be learned in a couple of hours.
You might consider native app development if:
- You are ready to invest more for a superior UI and performance.
Due to the need to develop it separately for the different platforms, native development is usually more costlier than hybrid. Not only does it require a greater number of employees to be involved, maintenance, debugging, and updates take additional time and resources.
- Your app requires access to hardware-related features such as gestures, geolocations or Touch ID.
Native approach provides full connection with native hardware controls. Although some of the tools for cross-platform development such as React Native have elements that can be directly mapped to native hardware controls, you will have to deal with differences in tools and languages and lose the flexibility that native platforms provide.
- You’re developing a graphics-heavy app/game with the topmost performance or speed requirements.
Since native apps are compiled directly on the hardware without any abstraction layers, you can expect the highest performance possible.
Hybrid App Development
Hybrid mobile development
Ionic is an AngularJS-based framework which is why it shares a whole set of advantages and a supporting community with the famous framework. Moreover, major developments in Angular 2 and 4 frameworks promise a lot of improvements for Ionic as well. The critical ability to make hybrid apps have a native look is also well implemented. For instance, it reuses DOM elements to handle one of the reasons for poor mobile performance. And Ionic utilizes ngCordova to provides access to native functionality like camera or GPS, just like any other framework.
Despite the many advantages of the tools for almost-native hybrid development, the solution is far from perfect in many aspects. Its most common drawbacks are:
- low performance,
- slower interactions,
- generic UX,
- limited access to device’s hardware and OS-specific features.
Cross-platform approach employs a single toolset to deliver apps across multiple platforms. Unlike hybrid development that combines both native and Web components, cross-platform technique involves using non-web and standalone tools. The most popular solutions for cross-platform development include Xamarin and React Native.
With Xamarin, source code is written using C# and .Net framework. It is then cross-compiled into the native code separately for any platform (iOS, Android, WP, even Apple Watch and Android Wear). You can read our previous posts about the pros and cons of using Xamarin and Xamarin use cases to develop a deeper understanding of this approach.
Among other approaches, just as recognized but less functionally advanced, are Titanium and NativeScript.
- Open-source development ecosystem — the NativeScript team accepts feedback and feature requests and greatly welcomes contributions.
- Quick support for the new versions of the platforms — the team makes sure to deliver support as soon as the new iOS and Android versions become available.
The biggest challenge you’ll have to deal with would be the framework’s young age. Even though the community is growing fast, the resources in terms of additional plugins are still limited.
So under what circumstances should you consider cross-platform or hybrid app development?
- Your team lacks experience in native development.
- You’re short on time.
If the required time to market is less than six months, the hybrid approach takes significantly less time, while cross-platform stands somewhere in the middle. Both ways could be a better alternative because the app is built in one source code, released across platforms, and the effort is considerably less as compared to that of native applications.
- You’re building an app for a temporary campaign.
Users wouldn’t want to download a big app for a one-time event that they will probably delete right after use. Still, such an app can improve a participant’s experience with the ability of offline access to the schedule or important documentation.
- Midsize businesses
Cross-platform and hybrid would be a suitable solution for small companies that do not have the budget to support several development teams required for Android, iOS, and Windows. When you have a small team of developers and aim for more than one market, you can quickly accelerate growth with each of the approaches.
- Low-budget applications with simple UI but heavy logic
Most of the cross-platform tools provide a close to native level of hardware capabilities and allow for a decent looking UI without much customization. This is particularly handy for B2B companies and enterprise mobility projects that set functionality way above looks. In case your project is for internal file or news sharing and a simplified interface, you will be satisfied with a hybrid app.
Choosing your approach
The major shift from desktop to mobile has not only enabled companies to adopt a mobile-first approach, but generally cater to mobile users as a central source of new customers. If you have a backlog of more than three apps for the next couple of years, choosing the right development strategy and toolset might be a decision worth millions.
Tailoring your mobile strategy to your audience needs is the only way to make the right decision about the technologies. So, consider first the purpose and resources at hand. Or ask for professional guidance.
You can find the original at AltexSoft’s blog: “Key Approaches To Mobile Development Explained”.