In January 2022, The New Stack posed the following questions: This article cites the work of developer and author of Best of JS, Michael Rambeau. Michael Rambeau tracks trending projects in the JavaScript ecosystem and summarizes them in his annual JavaScript Rising Stars. This ranks projects according to the stars they are given on GitHub.
The idea that JavaScript may be in its golden age is compelling. Despite frequent early rumors that WebAssembly and htmx frameworks would dethrone JavaScript, those predictions are still… predictions.
Meanwhile, JavaScript has arguably had another golden age as its frameworks proliferate as it spreads to the edge.
Javascript goes to the edge
One big trend likely to accelerate in 2023 is the shift of JavaScript to the edge. More companies like Cloudflare, Netlify, Deno, and Vercel have embraced this paradigm, making it easier than ever for developers to deploy to the edge.
“one more [trend] What’s really, really interesting is the rise of edge computing. This is primarily led by his CloudFlare and Deno.
Edge has traditionally meant Internet of Things technology, but when developers use the term, it tends to mean content delivery networks (CDNs). A CDN is a geographically distributed group of servers that deliver content from locations closest to your users. Also used as a synonym for serverless.
“We try to cache content closer to the user,” Wang explains. “So if I’m in San Francisco and I’m requesting US-East content, I’m actually pinging a local CDN data center instead of paying for US-East.” ‘s CDN service can be small — small enough to fit in a cell tower, he added. Wang claims there is a big movement to rewrite code to take advantage of the edge.
“We are deploying code to more servers, so in essence they are just small servers wherever they are. New centers — new generation […] Edge computing companies have actually found a way to take the JavaScript engine from Chrome and deploy it in a sort of V8 isolate running it as a server,” he said. “Chrome is very lightweight compared to the entire operating system. [so you’re] Just run it as a server. If you make it that small, you can get it a lot cheaper. “
As a result, edge servers tend to be cheaper than serving pages from a central location, he added.
Wang isn’t the only one to stress the value of the edge. This year he took center stage at the Jamstack Conference. Sunil PaiA former senior systems engineer at Cloudflare, suggested that developers move part of their website to the edge within the last quarter of 2022.
“We are currently working on the rest. We have a lot of work to do, but we should use it a lot today,” said Pai. Pai is currently building developer tools for edge applications. Founder of the Cool Computer Club.
Matt Biilmann, co-founder and CEO of Netlify, said his cloud-based development company recently saw about 3x month-over-month growth in edge use cases. According to his Netlify survey of about 7,000 developers in the Jamstack community, more than half are building edge dynamic sites to test edge. The study defines an edge dynamic site as “a site that is fully dynamic and renders all content at the edge (that is, uses serverless or edge functionality).”
The beginning of the end of a static page
One of the reasons for going to the edge is the promise of a degree of personalization that a static, server-side site just can’t deliver.
In a talk at Reactathon earlier this year, Wang argued that static side generation (SSG) is “basically dead.” He also noted the move towards incremental rendering along with edge routing. He pointed out that “Next.js is winning big” as a framework that supports this trend.
At a conference, Wang outlined the “eras” of JavaScript, arguing that we are now in the third era. He predicted that by the end of the 2020s we will be “re-skilled” out of JavaScript. He didn’t identify a potential replacement for JavaScript, but said WebAssembly is currently in its “first era.”
Get Frameworks! And you get the framework!
Well, it’s not. The same Jamstack community survey found React to be the most-used framework, with over 71% use by some or most projects in a ranking of the 29 frameworks that made the list. . React is technically a JavaScript library, but it forms the basis of many JS frameworks.
“Most evident in our framework data is the continued growth of React,” said the survey. “There are many options for building reactive web apps, but the huge ecosystem surrounding React keeps him an easy choice for many.”
That hasn’t stopped alternative frameworks, including Fresh, from entering this crowded field.
Fresh is a full-stack JavaScript framework created by Deno software engineer Luca Casonato. It is based on Preact, a JavaScript library touted as an alternative to Meta’s React. I also use Deno instead of his more popular NodeJS.
Continuing the trend to move to the edge, Fresh is optimized for edge computing, with most rendering done on the server, Casonato told The New Stack. This, Casonato claims, will perform better all over the world, even on slower devices. He said his other JavaScript frameworks, which send more code to the client, often struggle compared to slower devices.
He compared it to Node.js and Vercel, which he said could have serverless capabilities running on Amazon Web Services in a single region. But why create another framework?Casonato said speed and developer experience were two aspects he felt were lacking in other frameworks. The combination, he argued, was a better framework with fewer drawbacks than existing frameworks.
“Since the framework is really built for server-side rendering, very little JavaScript and code is sent to the client and kept on the server as much as possible, resulting in a very agile experience for the user. ,” he said.
Redwood was also released this year. Another JavaScript-based full-stack framework using React, but aimed at startups and enterprises that want a complete stack based on popular tooling. Github founder and former CEO Tom Preston-Warner is one of his four founders and his 300 contributors to the open source web development framework.
“What I wanted to do was bring together a set of tools that were already in common use, but I did the hard work of integrating them so beautifully that people could find special features in their applications. ,” said Preston-Warner. new stack.
We are unlikely to see the end of new JavaScript frameworks, according to Kelsey Hightower, a prominent engineer at Google and a frequent speaker at conferences. Hightower told The New Stack that he will never be the only JavaScript framework.
“There is no one because the experience keeps changing,” says Hightower. “We like it as humans because we want to hear something new. .”
ECMAScript progress
JavaScript, an open standard, has also undergone eight updates this year with the release of ECMAScript 2022. Several developers pointed to the error.cause feature as a significant upgrade.
One of the changes Wang is looking forward to in 2023 is a temporary proposal in Phase 3 of a four-step proposal process. This addresses complex and sometimes obscure data format issues, he told The New Stack.
Overall, JavaScript continues to be the driving force behind web application innovation on the web. Only now is it more prominent on the edge and with more frameworks to choose from.