Programming languages: JavaScript developers reveal their favorite frameworks, platforms, and tools

The preferences of JavaScript developers are detailed in the latest npm survey.

The best programming languages to learn in 2019: Top coding skills that pay you the most These are the languages that are in the highest demand and offer the highest salaries.

JavaScript may be the world's most widely used programming language, but how exactly are developers using it?

The latest npm survey of JavaScript developers highlights their favorite technologies, software frameworks, and associated programming languages.

For the 2019 survey, the group behind npm, the Node.js JavaScript package manager, canvassed the views of more than 30,000 developers, the majority of whom have been coding in JavaScript for more than three years.

While the most common use for JavaScript was as web browser scripting language, the increasingly diverse uses of JS were captured by the survey, with almost four fifths of developers writing JavaScript to run on servers in a Node.js environment, and just under half writing JavaScript used in native apps on mobile and desktop.

javascript.png
Image: npm

The tools, languages, and frameworks used by JavaScript developers

More than half of JavaScript developers write React code

With 57% of developers saying they write React code, it seems Facebook's open-source software library for developing user interfaces is widely used by the JavaScript community.

Among those React developers, about half said they primarily write React code, while one third used React in some projects.

A further 15% of developers not currently using React said they were considering it for a future project.

"Within npm's enormous user base there are approximately 5 million React developers worldwide. There has never been a JavaScript framework this popular before, and it is more than twice as popular as the next-biggest framework, Angular," the report concludes.

TypeScript's use continues to grow

TypeScript builds on top of JavaScript to offer a series of tools that make it easier to build large and complex apps.

The increasing popularity of the language, a JavaScript superset, was evident in this year's survey, with 62% reporting they use TypeScript, up from 46% the year before.

SEE: 10 ways to prevent developer burnout (free PDF) (TechRepublic)

Among those who use TypeScript, about 36% write TypeScript "some or most of the time", while 15% use TypeScript-based software libraries, which npm attributes to the popularity of the TypeScript-heavy Angular UI framework.

"That a third of the users in the JavaScript community are writing a totally new flavor of JavaScript should make everyone sit up and take notice," the report states.

TypeScript is even inspiring other languages, with Python creator Guido van Rossum recently telling an audience of developers that Python was learning lessons from TypeScript's optional type checking.

One third are deploying JavaScript on serverless platforms

Serverless platforms such as AWS Lambda and Microsoft's Azure Functions offer developers the chance to deploy code without the hassle of managing any infrastructure or the cost of running virtual machines 24/7.

Despite being a relatively new architecture, serverless platforms are now used by 33% of JavaScript developers, the survey found. Node.js JavaScript is one of the most commonly supported languages across the serverless platforms offered by major cloud providers, perhaps explaining serverless' popularity among JavaScript devs.

Containers are the most popular form of virtual infrastructure among those surveyed, used by more than half of JavaScript developers, followed closely by platform-as-a-service (PaaS) offerings, and then managed virtual machines.

Most developers aren't using GraphQL but that could be about to change

Facebook's GraphQL specification promises to provide an easier way to both serve and pull down data but is still not widely used among JavaScript developers.

Just seven percent of those surveyed said they frequently use the API query language, however, it looks like that proportion could grow rapidly this year, with just under half saying they considering using GraphQL in 2019.

JavaScript developers are intrigued by WebAssembly

WebAssembly or WASM is a tempting prospect for JavaScript developers, with just over half expressing an interest in using it — although just three percent do at present.

WASM is designed to bring high-performance software to the web, offering a binary instruction format that allows browsers to run software anywhere from 10% to 800% faster than is typically possible using JavaScript.

WebAssembly isn't designed to be a programming language that humans write, even if it can be viewed in a human-readable format. Rather it's a language that is generated by a compiler, based on code written by developers in a higher-level programming language such as Rust.

WebAssembly can run alongside HTML, CSS and JavaScript in the browser, with the WASM module being loaded in using JavaScript APIs.

"Modules written in WebAssembly can interoperate seamlessly with existing npm modules written in JavaScript, which holds great potential for bringing in existing libraries written in other languages," states the report.

"A massive 54% are paying attention and interested in its potential. This is a very strong sign for WebAssembly's adoption in 2019 and beyond."

If you're interested in finding out more about TypeScript, check out TechRepublic's round-up of the best free resources for learning the language online.

Also see

By Nick Heath

Nick Heath is chief reporter for TechRepublic. He writes about the technology that IT decision makers need to know about, and the latest happenings in the European tech scene.