Two Helpful Tools In Creating New Era Hybrid Mobile Apps

April 17, 2017 Appirio

By: Kamal Sharma

Humanity has evolved to a point where mobile is now the driving force behind day-to-day activities. The development of various OS platforms has been a challenge for the development of compatible and native apps. Creating native apps for individual OS obviously requires a proper training and hands-on experience. Hence, hybrid mobile app found its way as a solution, and has become popular in a short time span. Writing one single code for the entire OS was probably a very relaxing experience for the developers.

Hybrid mobile app … the beginning

To create a hybrid mobile app, web technology was the only choice because each OS has a specified browser to run the web code (html). So the programmer started digging into the idea, and found a solution — if an app is developed as an html single-page app with the OS specific browser, it will  run. It simply resolves the time-consuming problem of writing different codes for different OS. Cordova/Phonegap/Mediafly are some examples of apps developed to compile html app and create a build — all of which have OS-specific browsers on which the html app runs. The dream seems to come alive when writing a single app for multiple platforms. The problem is, the code really wants a framework like AngularJS to manage the web app like a mobile app. Here is where the most-loved JS framework comes into the picture.

AngularJS provides value-add as follows:

  • This tool helps create a single page html app.
  • It includes MVC architecture which also provides a robust routing framework to navigate around different pages.

The drawbacks of AngularJS are:

  • Feels like a hack to the problem, not the proper solution.
  • The html UI is completely different than native UI, and therefore doesn’t give the native app look and feel.
  • Because Angular JS is a hybrid app that runs on a browser, which means it’s an app on another app. So it innately runs into performance issues, like lag in screen navigation.

Native Script enters the picture

To overcome the drawbacks of browser-based hybrid mobile app, a new framework was developed. The new framework uses native APIs of the OS to design the screens. NativeScript is an open source JavaScript framework that lets you build native mobile apps from a single code base. It provides a number of JavaScript APIs, which internally calls to the native APIs of OS for rendering.

For Example:

var dialogs = require(“ui/dialogs”);
dialogs.alert({ message: “NativeScript rocks!” });

This JavaScript code will give different UI on iOS and Android, luckily the developer just needs to write the same alert function. NativeScript Uses pure XML, not DOM, to design pages. It runs as native app without using any browser.

A more powerful design

The NativeScript Team felt the need for the angular option, and had the discussion with the Angular team while Angular2 was on the way. They decided to work together to make the real hybrid mobile app development possible along with native feel.

Angular2 was now re-designed in a way to be bound to any XML(not to html only). Let’s take a look at the bonding between NativeScript and Angular2:

The image shows that we are using Angular2 to modularise the app and the creating component simultaneously. Meanwhile, the checkbox input of NativeScript is rendering on Android and iOS as switch button with their native UI.

The benefits of teaming up

  1. NativeScript apps are native apps only, and equally stands with native apps while comparing on different standards.
  2. Angular2 gives a modularised way to manage the app, while most of the developer work is already complete. An app that is developed both in NativeScript + Angular2 not only runs on iOS and Android as native app, but also serves well as web browser.
  3. NativeScript + Angular2 are JavaScript frameworks. Your developer will have the ability to design  native apps with their existing skill set.

These two tools are designed to help you to sync up with the hybrid mobile app technologies world. Both the NativeScript and Angular2 frameworks give a vibrance to the mobile era. If you’d like to learn more about native scripts, we recommend reading up at

Previous Article
Leveraging Use Case Diagrams in Smoke Testing
Leveraging Use Case Diagrams in Smoke Testing

By Preeti Sharma Do you want a way to perform smoke testing on new builds deployed in Test Environment? Sta...

Next Article
Pre-Chat Form Setup in Salesforce Live Agent
Pre-Chat Form Setup in Salesforce Live Agent