The direction JavaScript is headed in 2022

close up shot of a golden compass directional path by blackred gettyimages 1133496281 2400x1600 100858176 large


Since 2016, the State of JavaScript survey has done the monumental work of asking dozens of JS about the various frameworks, techniques, and features they use to build their applications. The latest materialization of this superhuman effort will take place in the spring of 2022, and the results are available now. These results are a treasure trove of interesting data about the JavaScript space. Here are some key highlights and takeaways.

What next for React?

Frameworks (front-end, back-end, and full-stack) have been a very active area for JavaScript over the last few years. This has calmed down somewhat, but there are still quite a few new projects entering the space.

On the front end, React is still the leader, ranking first in usage and awareness. However, React only ranks 4th in interest and 3rd in retention. Which front-end framework receives the most interest and retention? Those are Svelte and Solid respectively. This is a slight shift from last year when Svelte was number one in both categories. Svelte and Solid are vying for the title of favorite of emerging developers.

Angular is showing ominous signs of weakness when it comes to retention and interest, ranking last at number 9. Still, he remains second in actual usage and third in awareness. Vue continues to be a strong contender, ranking well in all categories.

Overall, the front-end story is more of incremental refinement than revolutionary upheaval.

And in the backend? Next.js sparked the full-stack JavaScript movement and maintains her second position behind Express in both awareness and usage. Of course, the comparison between Next and Express is imperfect. Express is a server-side framework only and a node-based HTTP workhorse. Next is a completely different animal, allowing you to build and wire up your client and server.

In terms of developer interest and retention, SvelteKit leads the field, taking first place in both categories. Interestingly, newcomers Remix and Astro took his 2nd place and his 3rd place. His Gatsby on Static Sites generator still ranks him third in awareness and usage, but both in interest and retention he slips back to number 13.

In a style similar to Vue itself, Nuxt, Vue’s full-stack framework, scored a respectable 4th place in awareness and usage, and ranked 9th in interest and retention. Astro ranked him third in retention, and second in interest. Fastify framework ranked 3rd in retention rate.

Unstoppable TypeScript and tsc

One of the strongest trends is the continued growth of TypeScript and increased awareness and usage of its command line compiler, tsc. TypeScript has gone from an interesting idea to a standard over the last few years. The JavaScript flavor question he answered was answered by over 11,000 people, and 98.6% of his respondents named TypeScript as the technology he uses when compiling to JavaScript from another.

This leaves about 6,000 survey respondents, or about 30% who did not answer the question. You’re probably using standard JavaScript. Admittedly, a significant percentage of developers using TypeScript still use plain JavaScript as well. Still, the takeaway from this question is that 69% of his respondents use TypeScript in some way, to some degree.

The rise of tsc as a build tool (i.e. a tool that compiles TypeScript to JavaScript via a tsconfig.json file) is charted in the popularity/satisfaction quadrant.

Popular elm

Another interesting finding related to languages ​​that compile to JavaScript is the popularity of Elm. Elm is his ingenious functional language for web development, lauded for enabling fast and fluent applications. But it’s also a project stalled for months without being committed. Clearly, Elm’s basic ideas are still desirable and popular. Perhaps a new leader can pick up the project and advance it for the benefit of the entire ecosystem.

Elm’s future is underscored by winning the Most Write-Ins award. Users liked Elm so much that they filled it in, even when Elm was not explicitly selected among the answers to the survey questions.

Null Coalesce Coalesce

JavaScript developers love null coalescing and optional chaining. It’s not hard to see why. Both features make the need to repeat more simple and concise by handling nulls correctly in setting values ​​and avoiding null pointer exceptions in chained property references. (More information on both features can be found here.) Dynamic imports have also grown to be a well-known feature, although not as widely used. This is understandable, since lazy loading of modules is not that common. (For more information on dynamic imports, see here.)

Shadow DOM and Lit

On the browser API side, WebSockets are well known and widely used, with nearly 70% of developers knowing about WebSockets saying they’ve used them. Shadow DOM has a similar footprint, with about 70% aware of this feature and about 66% aware of using it. Shadow DOM is a particularly interesting feature because it represents a frontier between frameworks like React, W3C standards, and browser implementations.

Speaking of Shadow DOM, the Lit framework, which is explicitly built on top of the shadow DOM in browsers and the web components spec foundation, has risen slightly from obscurity since 2020 to the date of our investigation.

Test with Jest

One of the rising stars in the JS ecosystem is the Jest testing framework. Jest was one of the most positively received technologies in the 2020 survey, and the latest survey shows that while the number of developers using Jest is on the rise, the trend has slowed slightly. is shown.

Jest is built into the create-react-app tool and is the foundation for other React testing tools. This drives a lot of adoption, but while React’s popularity has plateaued, Jest’s popularity continues to grow. This is because Jest isn’t limited to React, it’s becoming popular for use with a variety of other frameworks, as well as vanilla JavaScript and TypeScript.

battle of build tools

Webpack is the de facto king of JavaScript build pipelines, and our current research reflects that. However, while the number of developers using Webpack appears to be stable, we’ve also seen an increase in the number of developers reporting complaints. One factor in this dissatisfaction may be expectations. The simple fact is that the more people use a common tool, the more people will use it. necessary Even though it has become a standard, the more it is used, the more it tends to be criticized as a tool that should work without problems.

However, Vite’s entry into the space may be a big factor in Webpack’s decline in satisfaction. A fancy new approach to building JavaScript apps, Vite aims to address some of Webpack’s shortcomings. High-profile projects like SvelteKit have adopted it, and Vite actually won the State of JS Best Retention Award this year, so it seems to work well.

Snowpack, Rollup, and Parcel are also nibbling on Webpack’s mindshare, but esbuild has seen the most dramatic rise in awareness and reuse (you can read more about esbuild here). Another startup is his SWC, which is also seeing a surge of interest among developers.

Where JS developers come from

It’s no surprise that the United States is home to the world’s largest developers. But can you guess which country comes second?The respondent said that 6.6% of her respondents were from Germany, so if you guessed Germany, you’d be right. After Germany, Russia accounts for her 6.2% share, while France and the UK account for 5.7% and her 5.4% respectively. Surprisingly, China only made up her 1.6% of respondents.

Perhaps the biggest takeaway here is the increasing globalization of JavaScript and software development in general. Certainly this is something to celebrate. Coders have a striking international distribution, from Nepal to Nigeria, with surprisingly the only his JS coder reporting from Antarctica.

A lot happened in JavaScript

As Sacha Greif, author of the study, acknowledged, “The study can only represent a very small part of the JavaScript ecosystem.” Furthermore, the open format of the study does not allow for promotion or promotion among covered projects. , making even outright games susceptible. The results should be viewed as general trends rather than rigid rankings.

The State of JavaScript survey was created with the goal of identifying trends in the web development ecosystem and providing information to help developers make choices, and it seems to have achieved that goal. Perhaps even more usefully, the survey serves as a great way to draw attention to interesting technologies and projects that you might otherwise miss entirely.

It certainly makes for interesting reading. We wish Sacha Greif and his team the very best in their heroic efforts in the coming year and for many years to come.

Copyright © 2022 IDG Communications, Inc.


Source link

What do you think?

Leave a Reply

GIPHY App Key not set. Please check settings

    wordpress database caching 6334842965237 sej

    WordPress 6.1 includes “significant database performance improvements”

    KMW21 Sub Cover Image

    CSS Corp Rebrands as Movate to Reflect Commitment to Innovation