Technical
The Frontend Shift: Shipping Less JavaScript In Year Two
A year ago my default was Next.js for any frontend. Today my default starts much lower on the stack. Static HTML. A sprinkle of Alpine. Next.js only when real interactivity earns it.
The business problem is page weight and team velocity. Large SPAs are slow to build, slow to load, and slow to onboard new team members onto. They also look the same as the last ten sites the visitor just closed.
The progression I follow now
- Static HTML with a build step for content sites
- HTML plus Alpine.js for light interactivity
- HTMX for server-rendered pages that need partial updates
- Next.js only when the app truly needs client state or real time
Each tier is an order of magnitude lighter than the next.
A real example
<div x-data="{ open: false }">
<button @click="open = !open">Toggle</button>
<div x-show="open">Hidden content</div>
</div>Fifteen lines of Alpine replace what used to be a React component, a state hook, and a build pipeline.
When I still reach for Next.js
- Authenticated dashboards
- Multi step forms with live validation
- Real time collaboration features
When I do not
- Marketing sites
- Blogs
- Content libraries
- Admin tools that a small team uses
What this changes for clients
A lighter stack means faster sites, lower costs, and fewer build failures. The trade is a smaller hiring pool for maintenance, but most small teams never hire a frontend specialist anyway.
The principle
Pick the lightest technology that covers the real requirements. Upgrade only when reality demands it. See htmx.org and alpinejs.dev if you want to try the middle tiers. They will feel surprisingly complete.
RELATED READING
The Consulting Shift I Am Making In Year Two
After a year of writing and building, my consulting practice is changing shape. Shorter engagements. Sharper outcomes.
ReadThe Serverless Lesson I Would Write On A Sticky Note
After a year of shipping serverless projects, one rule explains most of the wins and all of the losses.
ReadA Year Two Python Refactor: What I Changed In My Script Style
My Python style shifted over the year. Four small changes that made every script shorter and easier to read.
Read