If we had to pick an emerging and changing field in technology throughout development today, Mobile application development would be the most accurate choice. Tools and frameworks in this field are more exposed to bigger changes. That is why, new hybrid mobile app frameworks are emerging again and one of these new frameworks is Nativescript. Nativescript is a new open-source technology by Telerik that enables developing native apps using Javascript or Typescript, that can run on Android, iOS and, in the near future, Windows, with the Windows Universal Apps flavour. This native feature is what puts the de facto hybrid mobile app framework Ionic in peril, making it possible to be replaced by Nativescript, a more performant alternative.

How native is Nativescript?

I guess you’re surprised that Nativescript supports developing native mobile apps using Javascript as the programming language, using also a subset of CSS for UI customization and XML for component view definition and layouts. This new technology uses the native UI components in the mobile platform where the app runs, making the user experience faster, smoother and more familiar. Invoking native platform methods is also possible, and you don’t have to use a different language, you can simply use them from Javascript. This feature is amazing, allowing you to use the good native things while you use Javascript as the glue-code to put everything together and leave heavy-weight operations and UI to the device native APIs. But, how does this work? To make this possible, Nativescript uses different Javascript engines depending on the platform, and expose Javascript objects with the native APIs, calling native APIs like if they were just methods and objects in Javascript. A thorough explanation is available in this post focusing on the Javascript/Native bridge mechanism. Also, a less extense but maybe easier explanation can be found in the next video.

Community and plugins

Nativescript community is growing day by day. A Slack channel is available and they are also putting some effort in the project internationalization.

Many plugins have already been developed to be able to use native components in Nativescript, and there is also an official marketplace of plugins called the Telerik Verified Plugins Marketplace Some good examples are, an Admob plugin, Sqlite, Social Share or Firebase. And, remember, you will always be able to use the native Javascript bridge if you need to invoke native platform methods.

There are also utilities that make using Nativescript less painful for those who are not used to the terminal. Telerik is developing a Visual Studio Code extension that can be installed from the following link. With this extension, you can launch your application from the IDE without having to execute manually the Nativescript commands.

Is it a mature technology?

Nativescript is a new technology and there are still some points where it can be improved. After having tested the tool, its development workflow could be difficult to the beginner, and there are some execution options, like livesync, where finding that you have some error in the XML markup might get unnoticed. I guess some of these things will get improved in future releases.

Apart from this, a key point is the community. Ionic, the framework that made hybrid-app development mainstream, has a mature community and it’s still a Javascript framework widely used, so here is a big challenge for the Nativescript team in order to grow a community around it.

Native against standard.

Ionic is in a tough situation. Ionic’s team is working on Ionic 2 which will give support to Angular.js 2. This new framework is a revolution in Frontend development, and it was a must to have it in its version 2, but that has made them lose steam against technologies like Facebook’s React Native or Nativescript in things like performance. Nativescript 2.0 also supports Angular.js 2, what could be summed up as that Ionic might be less competitive than Nativescript for those developers who start an app from scratch.

All in all, hybrid apps framework market is in a revolution (again). There are good prospects for solutions that are closer to native, while Ionic should consider including some of them in their framework unless these native-UI solutions are not so valued by developers as they should be. We’ll see in the near future if Nativescript becomes the reference in hybrid app development, or Ionic Framework stands still in its current top position.