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

Join the Conversation

Your email address will not be published. Required fields are marked *

  1. Very Nice article Kamal and good info. However, how practical is it really building Hybrid mobile? In my experience and also talking with other tech developers at WWDC17 & TDX17 Hybrid is very low on the list. As platforms diverge and frameworks expand faster than universe your developers will have super hard time to keep up.
    1. You need super-polyglot JS web developer to pull off Hybrid, skills required (CSS, JS, MOobile native iOS, Droid, Services, JS frameworks, UI) found these skills all in single person NOT likely in practice.
    2. If you got JS Superhero – very very hard to keep them and they are hard to come by
    3. Devices diverge in screens and capability, it’s inevitable your code soon look like mix of IF/ELSE special device cases
    4. Once you have Hybrid app need to support it. one JS Developer code is != to another JS superstar code to manage this complex code using mix of Native/JS, CSS tricks etc.
    Not mentioning but debugging such app….. it’s not like Loading XCode or Droid Studio and run it all.

Subscribe to our blogs

Subscribe to our blogs