The Jamstack crowd is rediscovering the server? Netlify introduces the new Next.js middleware runtime •

Netlify, which maintains a hosting platform for modern JavaScript frameworks, has introduced a new runtime environment for the Next.js framework, including beta support for its middleware that allows web requests to be transformed on the server.

The new runtime, enabled by an npm package called @netlify/next, includes the ability to perform HTML rewrites and append data by calling serverless functions. Support for Next 12 middleware, which performs functions on the server before a request has completed processing, is in beta.

There are some complications, including the fact that the middleware works best in an edge function, but doesn’t by default, as explained here. Netlify Edge features were introduced in April. The Next.js runtime code is open source under the MIT license.

Long-time web professionals can smile at some of the publicity for the new Next.js runtime. Matt Biilmann, co-founder and CEO of Netlify, is known as a pioneer of the Jamstack architecture, which, in the words of its official website, “removes the need for business logic to dictate web experience. It enables a composable architecture for the web where custom logic and third-party services are consumed through APIs.

Now, the press release for the updated runtime states that: “Previously, creating dynamic personalization with Next.js required either server-side rendering (SSR) or heavy client-side JavaScript. Netlify’s new advanced Next.js middleware, available with Netlify’s Next.js runtime, eliminates these trade-offs.

This “heavy client-side JavaScript” is a consequence of moving much of the application logic to the client, with the data behind a web page or application pulled from microservices APIs. Now, Netlify says “HTML rewrites and page data transformation directly from the edge” makes it “much easier” to deliver personalized user experiences such as personalization, localization, authentication, etc., while achieving optimum performance”.

In this context, “the edge” is not quite the same as a traditional web server, as server-side processing takes place on a server closer to the user’s device, but also note the caveat above about where the middleware runs. Nonetheless, the template takes Jamstack’s original concept and introduces something more like traditional server-side PHP or ASP.NET, even though the company prefers not to call it “server-side rendering” (SSR).

That doesn’t mean Netlify’s new feature is wrong. On the contrary, the company offers a modern application platform including CI/CD, planned functions, observability and low latency thanks to its edge network, without the burden of managing a lot of infrastructure, although in this respect , it has a lot of competition.

It seems, however, that the application architecture pendulum swinging from client to server and back again continues to swing.