BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News NativeScript 2.0 Release Brings Mobile App Development with Angular 2

NativeScript 2.0 Release Brings Mobile App Development with Angular 2

Bookmarks

NativeScript 2.0 has been released, integrating with AngularJS 2.0 to allow developers to write native mobile applications for iOS and Android.

In the blog post NativeScript 2.0 - the best way to build cross-platform native mobile apps, Valio Stoychev of Telerik says that with Angular 2 the framework brings developers "an unprecedented code reuse story between [their] web and native mobile app."

By allowing developers to reuse existing code to build mobile applications across mulitple platforms, the NativeScript release aims to decrease both the learning curve and ramp-up time for Angular developers building native mobile apps.

In the post Code Reuse in Angular 2 Native Mobile Apps with NativeScript Nathan Walker, engineer and Angular/NativeScript enthusiast, said "This is not hybrid, Cordova or webviews. These are truly native, 60fps mobile applications written with JavaScript."

Walker demonstrated the native applications with the below image of Chrome, Android and iPhone all running the same code.

NativeScript 2.0. Chrome, Android and iPhone all running the same code.

NativeScript 2.0 also comes with a big improvement in performance, with the release of an experimental feature designed to speed up Android applications.

Georgi Atanasov, director of software engineering, described the solution in the NativeScript github, saying

In a nutshell - since in Android application loading time is one of the areas that need improvement, we've made a POC implementation that takes advantage of V8's startup snapshots feature to see what may be achieved with it. The results are quite promising, and we may gain literally more than 1 second of an improvement by saving all the modules.

Antanasov continues, suggesting that because of the V8 API specifics, NativeScript needs to bundle entire modules of JS into one single file, and pass it to the V8::CreateSnapshotDataBlob method. The result, according to Stoychev, is that for applications in release mode developers are able to collect all the code into one package, and load it into the virtual machine memory.

Commenting on the 2.0 release, Todd Anglin (chief evangelist for Progress) told InfoQ, "For the more than one million developers using the Angular framework to write interactive web applications, the NativeScript 2.0 framework represents a giant leap forward—they can finally create zero-compromise mobile apps with Angular featuring truly native UI and performance."

On the roadmap for NativeScript is the popular request for Windows Support, along with multi-threading and improvements in the performance of NativeScript's hot reload functionality.

NativeScript is open source and released under the Apache 2.0 license.

Rate this Article

Adoption
Style

BT