RSS

TechTalk #29: Wait, the Platform Can Do That?

TechTalk #29: Wait, the Platform Can Do That?

How many megabytes of JavaScript does a cookie banner actually need? Thomas Jaggi, Co-Founder of LegacyNotes GmbH, spent most of his career building websites and, by his own account, still sees plenty of over-engineered, slow, hard-to-maintain ones. His talk, closing TechTalk #29 as the third of three, was a live rebuild of a common site, once with a popular framework, once with almost nothing but the platform itself.

The Reference Project

Thomas started from a fairly ordinary Next.js site: a blog listing with some posts streamed in after a short delay, and a consent overlay with a couple of buttons. Nothing unusual, and exactly the kind of setup a lot of teams reach for by default. The node_modules folder alone came in at 570 megabytes, most of it dependencies solving problems that, as he put it, the platform has often already solved in the meantime.

Rebuilding It Natively

He rebuilt the same server with plain Node.js and no framework, then removed dependency after dependency as Node’s built-in features covered them: a --watch flag instead of nodemon for restarting on file changes, native .env loading instead of the dotenv package, which by his estimate still gets pulled in well over a hundred million times a week despite Node supporting this natively for a while now. TypeScript support came next, not by compiling, but through Node’s native type-stripping, which runs a restricted subset of TypeScript directly (no enums, for instance) instead of relying on the tens of millions of weekly downloads that packages like ts-node or tsx see for the same job.

The Browser Grew Up Too

The consent dialog itself needed no JavaScript at all for opening and closing, using the native <dialog> element together with new invoker command attributes that let a button control a dialog declaratively. The only script left was about 20 lines to persist the user’s choice to local storage, wired up through a custom element that runs the moment the browser discovers it in the DOM. A popover for the same dialog used the native Popover API together with CSS anchor positioning, a new capability that lets the browser reposition an element automatically if there isn’t enough space, all without a single line of JavaScript.

Streaming Without JavaScript

The trickiest part, streaming part of the page in after a delay, was the one place Thomas called “a bit of a hack”: declarative shadow DOM, wrapping the delayed content in a template tag the browser parses as it arrives. It reproduces what Next.js does with Suspense and several megabytes of shipped JavaScript, but with none at all. Routing between the overview and a detail page used the native URL Pattern API instead of a router library, and transitions between the two static pages used the View Transitions API, including its newer cross-document variant. In this build, it explicitly skips the animation for visitors with a reduced-motion preference set, a check worth adding to any view-transition implementation.

The Payoff

With JavaScript disabled entirely, the native version kept working end to end. The Next.js version didn’t. On a throttled connection, the native detail page loaded roughly twice as fast, and the dialog appeared immediately instead of waiting on around 650 kilobytes of JavaScript to be parsed and executed first.

What We Took Away

Thomas was careful to frame this as “the platform can also do this now”, not as a blanket argument against frameworks, some of his own examples still needed a workaround or two. But the underlying point holds up for us as well: nine.ch itself runs as a static Hugo site rather than a heavy JavaScript framework, for the same reasons Thomas laid out, less to ship, less to maintain, less that can quietly slow a page down. For anyone deploying their own apps on our Deploio PaaS, the same logic applies directly: a leaner dependency tree means faster builds and a smaller footprint to run, regardless of which framework, if any, ends up in front of it.

Find out more about deploying your own apps with Deploio, or see it in practice in our Demokratis case study. Questions about anything from the talk? Get in touch. We announce the next TechTalk on our channels, including our Meetup group «TechTalk @ Nine».

Comments & Questions

A GitHub account is required to comment.

Want to stay up to date?

Subscribe to our YouTube channel and visit the Blog on our website.