Navigation
Search
|
State of JavaScript: Insights from the latest JavaScript developer survey
Wednesday August 21, 2024. 11:00 AM , from InfoWorld
It can sometimes be overwhelming keeping up with everything happening in the world of JavaScript, but I think JavaScript developers mostly know we are lucky. We get to work in a space where smart people are constantly generating new ideas. We are surrounded by peers who are freely available and actively engaged, a high-water mark in open source creativity.
There are various ways to stay abreast of the changing JavaScript landscape, but possibly the most comprehensive is to watch for the results of the annual State of the JavaScript survey. This rite of self-reflection by the JavaScript community combines breadth and depth along with a practical sense of which JavaScript tools and features are being actively used by coders all over the world. The results of the 2023 State of JavaScript survey were recently released. Let’s crack it open and take a look. Strong types in JavaScript It’s a great irony, but the biggest language “pain point” for JavaScript is the lack of strong typing. The flexible straightforwardness of JavaScript’s native duck-typing is one of the things that has made it so wildly popular. But there are also many benefits to strong typing, and some JavaScript developers really want them! Even with the option of TypeScript, a full one third of survey respondents said they would like to see static typing in JavaScript. The interesting question then becomes: will we ever see types adopted into the ECMAScript language specification? It looks like we will but it’s hard to say when. See the ECMAScript proposal: Type Annotations for more about how and when strong types might be added to JavaScript. Meta frameworks Meta-frameworks are frameworks that combine a reactive front end like React or Vue within a larger system that includes a server-side and related features. Needless to say, such frameworks are extremely popular. Next.js is the leading meta-framework, holding a strong first position. But several lower profile frameworks are duking it out and gaining mindshare. Forty-four percent of JavaScript survey respondents indicated they had used and would use Next.js again. Its one-time close competitor, Gatsby, has fallen away with only 5% saying they would use it. Nuxt (the Vue version of Next.js), Astro, and SvelteKit are neck-and-neck at 18%, 17%, 16% respectively. Remix (8%), Docusaurus (7%), Eleventy (3%), and Deno Fresh (2.16%) currently bring up the rear in framework popularity. Seeing Astro among the top five JavaScript meta-frameworks raised an eyebrow. I’ve watched this project for a while (see Intro to Astro: Clever lazy loading for JavaScript) but its leading place on the survey suggests Astro is moving into the mainstream. I also was surprised by the emergence of Deno Fresh. Deno is the spiritual successor to Node.js and was also created by Node’s progenitor, Ryan Dahl. But it was news to me that Deno now includes a front-end meta framework. It is on my list to check it out. Front-end frameworks Pure front-end frameworks are rather predictable suspects at this point. React clearly leads the pack, with 65% of survey respondents expressing the “used it, want to use again” sentiment. Vue (38%), Svelte (22%), and Angular (20%) are the other leading front-end frameworks currently. Svelte taking the lead over Angular is the most interesting story there. While its real-world popularity is growing, Svelte remains an untried (that is, “heard of it, want to try it”) option for 48% of respondents. Awareness of HTMX is also growing, with 37% of respondents saying they want to try it. Stencil is an interesting outlier in this field, with 59% of respondents saying they’ve never heard of it. Build tools WebPack remains a popular and well-liked build pipeline, while Vite is seeing an extraordinary rise in usage and satisfaction. Vite’s rating on the “Used it and want to use it again” chart is an impressive 72%. WebPack holds a 48% ranking by the same measure. The difference between the two probably reflects Vite being specifically designed to improve on the previous generation of build tools like WebPack. These numbers may also reflect the reality that the more a tool is used, the more gripes people tend to have with it. Users tend become increasingly aware of and grumpy about a tool’s flaws with extended use. As tools become more established, they are also embedded into more projects, whether we like it or not. That latter consideration probably figures large in the dissatisfaction (“negative sentiment”) from previous users, where WebPack shows a whopping 48% negative experience versus 1.34% for Vite. The TypeScript command-line tooling (TSC CLI) seems to have peaked a couple of years ago and ranks at a still respectable 43% in the “used it, would use again” category. Additional build tools considered are Rollup, Parcel, SWC, TurboPack, tsup, and Biome. If you think that’s a lot of build tools for JavaScript, you are not alone! It’s also notable that the Bun bundler dominates in the “Other build tools” section, with 51% of users giving it a positive rating. Runtimes Anywhere you run JavaScript, that’s a runtime. It was a surprise to me that Node is now a more popular runtime than web browsers, at 94% versus 83%. That is really something. Less surprising but still remarkable is the rocket ship that is Bun.js, now representing 23% of runtime users. That is astounding for a project that only reached version 1.0 in September of 2023. Service workers (20%), Deno (15%), Hermes (4%), and ChakraCore (.5%) round out the field. Those numbers highlight the growing use of service workers and the steady adoption of Deno. Hosting A very interesting tale is unfolding among hosting services, wherein Vercel is challenging AWS’s dominance. The “Which of these services have you used to host JavaScript apps?” question shows AWS at 47% to Vercel’s 45%. This is followed closely with GitHub pages at 42%. Netlify (33%), Heroku (25%), Cloudflare (20%), Digital Ocean (20%), Azure (19%), and Google Cloud (18%) are also all well represented. Things to learn about JavaScript The latest survey introduces a reading list that lets readers save topics they want to learn more about. This is a nice feature when taking the survey and also provides insight into features other JavaScript users are interested in. This is a good page to look at to get a sense of what you might want to learn about yourself. The top of the list is error.cause (44%), which makes sense because it is a newer feature, and one that is simple and commonly needed. Logical assignment (38%) is another newer language feature that allows setting variables based on a unary logical operation. Other interesting items include Hashbang grammar (35%) and array.with (34%). Other languages JavaScript developers use a whole universe of other languages. Python leads the pack at 44%, not surprising given its use in machine learning and data analytics. PHP (31%), Java (27%), and C# (25%) still are strong favorites for JavaScript developers. Shell scripting languages are neck-and-neck with Bash (22%), Go (21%), and Rust (20%) taking the lead. Monorepos Among monorepos, pnpm has pulled away from the pack with 40% usage and 64% positivity. Bun again sees strong write-in support with 54% percent of respondents writing it in. Another newcomer, called Moon was written in by 14% of respondents to this question. Retention versus usage A great chart for an overview of the field is Retention vs. use. The chart gives you a grid with retention on one axis and the number of users on the other. It’s a fun chart to explore looking for things you have used or might want to learn about. Vitetest is high on retention with a considerable way to go in usage. React shows strong numbers on both counts, with retention at 76%. Tauri shows 91% retention. On the other end of things, the cross-platform framework Cordova, shows only 15% retention. Gatsby is not much better at 21%. Testing Jest has established and held its place as the most-used testing framework since 2019. Storybook is also much used at 53%. Cypress and Mocha are in a virtual tie around 48%. Puppeteer and the literally named Testing Library both hover around 40%. Vitatest is breaking out, having risen from 14% to 34% over the past year. Conclusion Probably the biggest takeaway from this year’s State of JavaScript survey is how active the space still is. There really aren’t any areas of JavaScript not seeing innovation and change. Besides the ongoing stability of React, it looks like an open field where almost anything can happen and probably will. If you were thinking of building something for JavaScript developers to use in their work, go for it! On the other hand, if you are trying to decide on a technology to use in your work, the changing landscape and wealth of choices can make it difficult. In fact, 10% of respondents noted “choice overload” as a JavaScript pain point. Using the survey to stay on top of trends and new technologies is a good practice to avoid overload and ensure you are choosing from among the best tools available.
https://www.infoworld.com/article/3486850/state-of-javascript-insights-from-the-latest-javascript-co...
Related News |
25 sources
Current Date
Dec, Wed 18 - 15:59 CET
|