Making sense of the mobile development ecosystem — Part 3: JavaScript native, cross-compiled and native apps

By Brian Rinaldi

This article is part of the “Making sense of the mobile development ecosystem” series, which offers an overview of current mobile development options. Part 1 laid out the spectrum from mobile web to native that you can see in the diagram below, and it addressed the mobile web option. Part 2 looked at hybrid and hybrid/native options. This article looks at native apps, as well as JavaScript native, cross-compiled and native development options.

The spectrum of mobile application development options

JavaScript native

JavaScript native is another new model for mobile app development, and there is actually no generally accepted name for it — I’m using the term that my colleague TJ VanToll and I coined in a recent app development overview on the Telerik Developer Network.

What differentiates JavaScript native from other mobile app development options is that the application user interface (UI) is entirely native, but the application code is still written in JavaScript. The goal is for the UI to look, feel and behave as a native app but still allow simple development, skill reuse, code reuse and other benefits that JavaScript development can offer.

Like hybrid, JavaScript native targets multiple mobile platforms with a single codebase. It relies upon an embedded JavaScript engine — for example, V8 for Android and JavaScriptCore for iOS. Calls to the device operating system APIs are translated to allow communication from JavaScript to the underlying native APIs. The UI is typically runtime generated from either markup or JavaScript code. As you can imagine, this isn’t something most developers can simply whip up themselves, but instead, they would rely upon a prebuilt platform or framework.

Despite being new, there are growing number of JavaScript native platforms. Appcelerator Titanium was the first of these, but much of the recent growth in popularity is driven by Facebook’s React Native, which drew on the success of the underlying React JavaScript framework to garner interest in this relatively new development model. Telerik has also released a JavaScript Native platform called NativeScript that, like React Native, is free and open source. However, there are other options including Tabris.js and Fuse. Each of these platforms takes a unique approach, but they all share the same underlying characteristics of JavaScript code paired with a native UI.

Cross-compiled development

Cross-compiled mobile apps are written in one language and then turned into native-compatible code during a build phase wherein the code is translated into a compiled application for each supported mobile platform. This allows developers to write the application in their language of preference, and then deploy a fully native app for each target platform.

There are solutions for writing mobile apps in Ruby (RubyMotion) and Java (RoboVM, which will be going away in 2017, according to a recent announcement). By far, the most well-known name in this space is Xamarin, which allows mobile app development for iOS, Android and Windows using the C# language. Xamarin was recently acquired by Microsoft and is now officially part of Visual Studio, the integrated development environment typically used by developers on Microsoft’s .NET platform.

If your development team’s skill sets are specifically around Ruby, Java or C#, then cross-compiled apps offer the benefit of leveraging your existing talent and getting near-native performance while still targeting multiple platforms with a single codebase.

Native apps

For the most part, all of these options are about developing a single solution that can target multiple mobile platforms. When people talk about native mobile app development, however, they are actually talking about multiple solutions that each target a specific mobile platform: Swift or Objective-C for iOS, and Java for Android. This means that if you intend to target both iOS and Android, you would need two codebases, and if you were to add another mobile platform, you’d need a third, and so on.

Despite having multiple codebases, there’s no way to beat native development in terms of optimizing performance and maximizing the capabilities of the individual operating system. In addition, the developer tooling for native mobile app development — for example, Xcode for iOS and Android Studio or Eclipse for Android — tends to be richer and tailored to the specific needs of that operating system. The tradeoff is that you’ll need development teams that are skilled in each platform’s language, and there is no code reuse across platforms or with your existing web application.

Weighing the pros and cons

Both JavaScript native and cross-compiled development offer nearly native performance within the comforts of a language and tool ecosystem that many developers are already comfortable with. Meanwhile, true native development lets you take full advantage of the performance and features of the mobile device, as well as the tooling specifically tailored for that mobile OS.

So, which option should you choose? The final article in this series will tackle that question, so stay tuned.


Written By

Brian Rinaldi

Developer Programs Manager, Telerik

Brian uses his decades of experience in development and the developer community to help the Telerik Developer Relations team deliver top-notch content and community programs. He is co-editor of the Mobile Web Weekly newsletter and authored the recent report on Static Site Generators…

Other Articles by Brian Rinaldi
See All Posts