Another powerful mobile native app development framework which is gaining popularity is NativeScript. It is written JavaScript or Typescript, which can be transpiled into JavaScript. It renders native UI components using it’s rendering engine. NativeScript was developed by Progress and released in 2014. It’s current version is 3.4.3.

NativeScript also supports AngularJS. It also supports Vue.js using the community developed plug-in. The resulting application is same as that of an Android Studio an an Xcode.

Installation and Structure

You can use npm to install NativeScript, whereas you can use GUI tool ‘Sidekick’ to create, configure and work on it. If someone wants to work on platform independent user interfaces, they can do so using XML followed by abstractions to call them.

To trigger the platform specific codes, NativeScript uses XML data structures which represent the cross platform structures. Some of the main notable features of NativeScript are the Native API Reflection, Angular Integration and the Vue Integration.

  • Native API Reflection: Instead of relying on requiring separate binding layers to handle API endpoints, Native Script uses reflection. With the use of this, NativeScript gains metadata and information and then adds new features to the native platform API which is immediately available.
  • Angular Integration: NativeScript 2.0 supports angular integration.
  • Vue Integration: We can also integrate Vue with the help of a community driven plug-in.

NativeScript Sidekick

When you start working with NativeScript, you get some starter templates to boost up the development process. Including these, Sidekick also contains some other cool features like debugging support, cloud builds and plug-ins. NativeScript also announced that they will be adding some other modern features like Augmented Reality, Code-Sharing feature, NativeScript Playground (already out) and NativeScript Marketplace. While the AR feature is supported only in iOS right now but their plan is to make it available both on Android and iOS.

NativeScript UI

The UI of NativeScript is page based. This means that the user develops and stores pages in XML files. The user an design the style of page using CSS and the creates the main logic code using JavaScript or TypeScript. A sample code to declare the home page is as follows:

Using JavaScript

Using TypeScript