NativeScript

Mobile App Development

NativeScript Development - The 12 Primary Characteristics

In this article we are going to go through all the pros and cons of the NativeScript technology for the purposes of application development. The categories which we are going to use for comparison are the same categories used for the Mobile App Development page. 

To learn more about other app development technologies (e.g. Flutter, React Native, Swift etc.) go to the Mobile App Development page.

INTEGU - NativeScript

Table of Contents

1. Hybrid

NativeScript allows the developer to create an app based on common web development tools and languages and convert it into native code using the NativeScript CLI. The compilation of the JavaScript code into native actually happens “Just In Time” (JIT) for the application to launch the function. This is in contrast to other hybrid and webview technologies.

All other hybrid technologies presented in this article will compile native code before the application is launched. Meanwhile the webviews of cause never compile their JavaScript code to Native, but instead creates a frame in which the web project can be launched. 

The technology has actually been around for several years but has never seen the same adoption rate as many of the other technologies. Nevertheless, it still offers some attractive features.

2. Development Cost

As a hybrid technology, NativeScript automatically gains the cost advantage, when compared with native technologies, because only one code base will be necessary.

NativeScript also provides JavaScript APIs for the device hardware (camera, storage, GPS), which means that only one primary programming language will be necessary. Thereby assisting in keeping the cost of development low. This is in contrast to other hybrid technologies, such as Xamarin.

3. Programming Language

NativeScript is written in JavaScript, and allows for implementations of several popular frameworks (e.g. Angular and Vue) as well as TypeScript.

Beside the JavaScript parts of the NativeScript project, it also utilizes a common markup language like XML for the native Android manifest and the iOS info.plist files. Likewise, XML, with the addition of CSS, is also used for building the applications UI. This work similar to HTML for regular web development.

4. Page-By-Page Adoption

NativesScript can access any native API. This means both device-specific (e.g. GPS and camera), third-party libraries, and of cause also your own previously build native project code. This thereby makes it possible to combine a NativeScript project with a native project on a page-by-page basis.

5. Supporters

NativeScript was originally developed and published by a company known by the name of Telerik.

At the end of 2014 it was acquired by Progress Software, which is currently still the owners and responsible of the maintenance of the source code.

Even though the NativeScript repository is open source, it can be seen from the contributions that it is primarily being maintained by developers from Telerik.

INTEGU - Progress-Software

6. Open Source

NativeScript is open source. The repository can be found here.

Even though the NativeScript repository is open source, it can be seen from the contributions that it is primarily being maintained by developers from Telerik.

7. Device API-Access

NativeScript can access native features (e.g. camera, GPS, sensors), directly from the JavaScript. Accessibility level can be compared with native code.

This thereby also means that only one primary programming language (JavaScript) will be necessary, which has a positive effect on both the development cost and the necessary learning curve for adapting the developers programming skills.

8. Performance

Performance achieved by NativeScript, it comparable to Android and iOS since the final app will be written as native.

However, the startup time of a NativeScript application suffers greatly when compared to native applications. This might be because of the “Just In Time” compilation of the JavaScript code to native Android and iOS code. This is a major disadvantage of NativeScript, which the team behind is also aware of.

9. UI Consistency

The creators behind NativeScript provides the NativeScript UI plugin, which allows you to implement native UI consistent components into the NativeScript project’s XML file.

The plugin provides a great list of components, which thereby ensures design flexibility, while keeping all of the code on one common code base for both iOS and Android.

10. Hot Reload

NativeScript supports hot reload, or as they like to call it: “Hot Module Replacement”. In contrast to live reloading, the hot module replacement ensures that the state of the application is persistent regardless of which change is made.

11. Require Native SDK

When installing the NativeScript CLI, it will ask you to install or update the native SDK’s. However, given that you cannot get an iOS SDK on windows, since you are not able to install Xcode, they have provided you with an alternative option.

Instead of you having to use processing power and memory storage to compile and store the NativeScript project on your local computer, NativeScript provides their own cloud IDE (Playground). This IDE provides QR-codes which can be read from both Android and iOS devices in order to load the application directly onto the device.

However, I (as a non-mac owner) would personally suggest that the majority of development was kept on my local computer and only pushed to the playground IDE when I had to test something on an iOS device.

12. Require Specific IDE

With NativeScript it is possible to select your preferred web development IDE.

However, NativeScript recommends the Visual Code Studio IDE, since it provides specially designed extensions for NativeScript.

When you eventually want to deploy your application to a physical device, it might be necessary for you to download and install Android Studio or Xcode. However, using the online Playground IDE makes it possible for you to deploy without having to work in any of the native IDEs or download their SDKs.

The Playground IDE provides QR-codes which can be read from both Android and iOS devices in order to load the application directly onto the device.

INTEGU - Visual-Studio

Recommended Reading

Article

  • Reuse native code – NativeScript – Blog
  • Google Trends – Google – Website
  • Stack Overflow Trends – Stack Overflow – Website
  • Why Does Progress Support NativeScript – NativeScript – Blog
  • NativeScript Repository – Network Graph – GitHub – Website
  • NativeScript Repository – GitHub – Website
  • NativeScript Start Up Time – NativeScript – Website
  • NativeScript for Visual Studio Code – NativeScript – Website
  • Installation – NativeScript – Website
  • NativeScript UI – NativeScript – Website
  • Hot Module Replacement – NativeScript – Website
  • Playground IDE – NativeScript –Website

Video

  • NativeScript Apps from Scratch – Alexander Ziskind – YouTube

Books

  • The NativeScript Book – NativeScript – Book

About

Hi, I'm the Author

My name is Daniel H. Jacobsen and I’m a dedicated and highly motivated software developer with a masters engineering degree within the field of ICT. 

I have through many years of constantly learning and adapting to new challenges, gained a well-rounded understanding of what it takes to stay up to date with new technologies, tools and utilities. 

The purpose of this blog is to share both my learnings and knowledge with other likeminded developers as well as illustrating how these topics can be taught in a different and alternative manner.

If you like the idea of that, I would encourage you to sign up for the newsletter.

Cheers! 🍺

Didn't Find What You Were Looking For?

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Scroll to Top
INTEGU - Cookie-consent

INTEGU uses cookies to personalize your experience and provide traceability for affiliate links. By using the website, you agree to these terms and conditions. To learn more see the privacy policy page.