JavaScript developers are taking over the world.
More applications than ever before are living on the client, using APIs to connect to any requisite (and most likely cloud-based) back-end services. With that, we’ve seen an explosion of tools and frameworks to make JavaScript development seem more like traditional programming, handling large codebases and issues such as type safety.
In the meantime, we are living in a mobile-first world, where apps have emerged as the favored interface to business, accessible via phone or tablet, freeing users from the bonds of the desktop.
How many languages and frameworks are developers required to learn these days to fulfill an organization’s digital mission? I spoke with Todd Anglin, who worked on NativeScript at Telerik before it was acquired by Progress, which is where he’s continuing his evangelism for the runtime.
“JavaScript represents the world’s largest developer population, so this makes it a very attractive space for developers interested in creating tools and libraries,” Anglin said. “Often these libraries are delivering capabilities that have been available in other programming languages, like creating a PDF, but now done in ‘pure’ JavaScript.”
Among the most popular abstractions, Anglin noted, are Node.js (JavaScript on the server), TypeScript (makes JavaScript feel like C#) and Angular JS (one of the world’s most used JavaScript app frameworks).
NativeScript, he explained, extends a JavaScript developer’s skills to native mobile apps. Unlike other runtimes, he told SD Times, NativeScript exposes 100% of the underlying native APIs to JavaScript, so developers can do anything in NativeScript that is possible in a traditional native iOS or Android app.
NativeScript began in 2013 as “sort of skunkworks engineering project that was looking at hybrid at the time—the Telerik platform does quite a bit of work with Adobe PhoneGap, Cordova and hybrid development—and there were lingering concerns about the limits of hybrid,” he said. “Hybrid’s great for a lot of scenarios, but there are these cases where little quirks of hybrid can become a bit of a nuisance, so the team began in 2013 and began to look at this problem, saying ‘Can we take what everyone likes about hybrid—that is the reuse of web developer skill set, the reuse of JavaScript libraries—can we take that and eliminate what is usually the big problem in hybrid, that HTML web key, which is prone to performance problems, and replace it with actual, genuinely native UI for each mobile platform?’”
Among hybrid tools, Apache Cordova and PhoneGap have been quite successful in bringing web developers to mobile. But in terms of engineering, Anglin called them “a stopgap. It was essentially just taking a web browser, wrapping it up in a shell, and then creating a little thin JavaScript bridge to let a web developer talk to native devices through APIs. And so we look at NativeScript as kind of the next generation of what PhoneGap tried to do. In my view,
I like to think of NativeScript as fulfilling the overdue promise of hybrid, which was always supposed to be write your application with reusable code with skills for the web, and then have a quality native app that can run on any platform. This is always what hybrid was supposed to do, but there’s a limit to what that little tiny web browser can achieve on a mobile device, especially with Apple.
“Apple,” he continued, “has been—whether you want to call it malicious or passively oblivious to how their little mobile web view works—they have a lot of barriers that they’ve built into iOS that make it a challenge to achieve high-performance apps when using that hybrid approach. We think NativeScript is very compelling. We think it does make a very smooth transition path from a hybrid developer to the NativeScript native approach. What the industry is now in many ways calling JavaScript Vivid Native, and we think it’s just now a matter of time before we get sort of a mass transition of that built-up Cordova audience to NativeScript.”
The most recent release of NativeScript, version 2.5, became available in January. You can find out more about the release here.