NativeScript is a system that allows you to write native apps for Android, iOS and Windows Phone using JavaScript - and no this isn't a wrapper for an HTML app.
You may have encountered frameworks like PhoneGap/Cordova that enable you to run Web apps as if they were native apps, but NativeScript follows Microsoft's approach - you can use different languages and even markup to create true native apps. At the moment Android is mainly Java and iOS is mainly Objective C/Swift.
NativeScript is standard JavaScript that has been extended with some clever middleware that allows you to call functions in the native API.
This sounds complicated, but it actually fairly straightforward. You make a full reference to the native API function, for example
var file=new java.io.File(path);
and this sets up a call to the Java API function File.
The clever part is that the JavaScript string that specifies the path is automatically converted to a java.lang.String object for the call. The Java File object as attached to the JavaScript variable file in the sense that any attempt to access properties on file are passed on to the Java File object. That is, file acts as a proxy for File.
The JavaScript is interpreted using the standard JavaScript engine V8 for Android and webkit for iOS and Windows Phone. Notice, however, that no wrapper is used - there is no browser component building the UI for you from HTML. If you want a button then you have to write JavaScript that calls the native class constructor.
At this point you may start to think that this is great but wait - I still have to write three versions of my app. One using Android native calls, one using iOS native calls and one using Windows Phone native calls. This means your only advantage is that you can make use of JavaScript for all three and this is possibly a language you know. The advantage of using a wrapper is that you are essentially writing a web app, i.e something that could run in a browser, and then using a wrapper that is essentially a modified browser to make it look a bit like a native app.
NativeScript can help you write just one app for all three platforms using a set of abstractions by way of the NativeScript Modules layer that map onto the native APIs. So instead of specifically calling the API function for File you can simply write:
var file=File(path);
and the abstraction layer will map the JavaScript to the correct native call.
The danger with adopting any scheme like the NativeScript Modules is that making any such abstractions complete is difficult and this means that there are always things you cannot do. In the case of NativeScript this isn't such a worry because you can always fall back on direct API calls.
[フレーム]
The NativeScript system is built on Node.js and to use it you still need to install parts of the native system you are working with - XCode, for example. So you still need some skill in using the native SDKs.
You might also be worried about the overheads in using all of these translations between systems, but it is clamed that it only slows things down by about 10%.
NativeScript has been developed by Telerik, known for its wrapper approach to developing "native" apps with JavaScript. The surprise is that NativeScript is open source under the Apache 2.0 licence. Presumably Telerik hopes to make a profit on supplying extras such as Telerik Platform Services
If this can be made to work, and if the performance loss is only about 10% as claimed, then this is a useful alternative way of creating native apps. It is hoped that a Version 1 will ship in April.
More Information
Related Articles
How Google Does Multi-Platform In Inbox
Microsoft's WinJS - New Cross-Platform Library
marin 3.0 Released With Xamarin Designer for iOS and Xamarin.Forms
To be informed about new articles on I Programmer, install the I Programmer Toolbar, subscribe to the RSS feed, follow us on, Twitter, Facebook, Google+ or Linkedin, or sign up for our weekly newsletter.
XAML.io 0.5 Adds Multi-File Project Editing
20/10/2025
Userware has released XAML.io Preview v0.5 with improvements including multi-file project editing. The team says this is an important step toward enabling visual .NET development directly in the brows [ ... ]
.NET 10, C# 14 and F# 10 Released Alongside Visual Studio 2026
13/11/2025
Microsoft has shipped .NET 10, the platform created from a combination of .NET Framework and .NET Core, including C# 14 and F# 10. Visual Studio 2026 has also been released at .NET Conf, the onli [ ... ]
- The Pico Gets Zephyr And Rust Support
- Join The Protest Against The Closing Of Android
- Robot Army Video As Robots Shipped En Masse
- Google AI Studio Does Angular
- IBM Launches Granite Version 4.0 and Granite-Docling
- Mico - A Personality For Copilot
- PyTorch Team Introduces Cluster Programming
- Insectile Garments For Dutch Design Week
- DH2i Launches DxEnterprise For SQL Server 2025
- OpenCode - The Claude Code Alternative
- Epic Settles With Google - Abandons The Rest Of Us
- GitHub Announces Agent HQ Organizer
- Next.js 16 Adds Cache Components
Comments
or email your comment to: comments@i-programmer.info