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 DevelopmentAs 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 monthsSince 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 officially support 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.
- Your app requires access to hardware-related features such as gestures, geolocations or Touch ID.
- You’re developing a graphics-heavy app/game with the topmost performance or speed requirements.
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 DevelopmentCross-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.
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.
- You’re building an app for a temporary campaign.
- Midsize businesses
- Low-budget applications with simple UI but heavy logic
Choosing your approachThe 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.