Java 25 · zero dependencies · AI · a tribute to a bad idea

Chop down the dependency tree

Zero dependencies sounded like a bad idea for as long as code was expensive. It isn't any more.

The advice is almost as old as the industry: never write your own parser, your own framework or your own security. It's wise advice. But it rests on arithmetic that no longer adds up. Two small projects test what happens when you do exactly what you're not supposed to.

Chop down the treeBuild it yourselfSoftware that ages wellSacred cows
A tangle of interconnected dependencies on the left, a dashed cut line, and on the right a single app standing directly on JDK 25.

We've learned that writing code is expensive and adding a dependency is cheap. Our whole industry rests on that arithmetic, and it has been true for so long that we've stopped seeing it as arithmetic. It has become a truth. But what if it isn't any more? What if it's now cheaper to own your code than to borrow it?

01 · The thought

The industry's holiest rule has expired

“Don't reinvent the wheel.” “Never roll your own crypto.” “Use a proven framework.” They're pieces of advice passed down from one generation of developers to the next, and they have served us well.

But look at why they were true. It was never because your own code is wrong in itself. It was because it was expensive. It took weeks to write an HTTP parser, months to make it stable and years to learn all its edge cases. A dependency was one line away.

Now AI writes that parser in an afternoon. Not perfectly, but well enough to start testing it, sharpening it and learning from it. When one side of the equation collapses that hard, the answer can't stay the same.

“Don't reinvent the wheel” was advice about cost. Not a law of nature.

02 · The experiment

Two projects that break every single rule

The earlier post about frameworks concluded that JSON and security were best left to the specialist libraries. Spola and Sola do the opposite and build it all themselves.

Spola is a Java 25 web framework that does what a web API needs from Spring Boot and Lombok – HTTP server, routing, JSON, validation, configuration, sessions and login – without annotation magic and without a single dependency outside the JDK. Sola is going to be the same thing for the browser: signals, templates and routing straight on the web platform, with no dependencies and no build step. What runs in the browser is exactly what you wrote.

The code is mostly written by AI. And both frameworks only grow when a real app needs something, so they never get bigger than what someone actually uses.

The dependency tree for spring-boot-starter-web: thirty-odd artifacts from Spring, Jackson, Tomcat, logging and more, four levels deep.
This is what you get with spring-boot-starter-web, roughly as Maven shows it for Spring Boot 3. Every line is a version to keep track of.
The dependency tree for spola.web: four modules that all stand directly on JDK 25, and then nothing more.
This is what you get with spola.web. Four modules, and beneath them only the JDK.
The whole stack, from the TCP socket to the button in the browser. No dependency tree.

03 · What you gain

Software that refuses to rot

Anyone who has maintained a Spring system knows where the time actually goes. Not to the business logic, but to everything around it: the move from javax to jakarta, Log4Shell over Christmas, dependency upgrades every sprint, and that time a minor version of a library three levels down changed behaviour without anyone noticing.

A system that stands only on the JDK and browser standards has none of that. Java is ridiculously backwards compatible. The web has a principle of never breaking an existing page. Build only on them and the code you write today can still work in twenty years.

And the best part: you can read all of it. Nobody can read all of Spring. But the whole HTTP server in Spola can be read in a few evenings. When something goes wrong there's no black box to blame, and nothing happening behind your back.

LifespanNo forced migrations, ever.
ReadabilityEvery line that affects a behaviour is in your own repo.
OwnershipNo vendors, no licensing questions, no surprises.
CalmNo CVE alerts for libraries you never knew you had.

04 · Old truths

Six sacred cows to slaughter

Here are some of the things you're never supposed to touch. Every one of them is worth questioning now.

Old truth

“Never write your own HTTP parser”

Request smuggling happens when two parsers interpret the same ambiguity differently. A parser that refuses to interpret – that answers 400 to anything ambiguous – closes that whole door. Strict beats clever.

Old truth

“Never write your own JSON parser”

Many of the worst vulnerabilities in JSON libraries come from polymorphic deserialization, which is reflection magic. Explicit mapping to records doesn't have that kind of bug. The simplest thing is the safest.

Old truth

“You need a build step”

ES modules, import maps and dynamic import() are in every browser. No bundler, no transpiling, no node_modules with a thousand folders.

Old truth

“You need a DI container”

Constructors exist. Plain Java code that wires the objects together can be followed with “Go to definition”, and a missing dependency becomes a startup error instead of a surprise in production.

Old truth

“The database needs an ORM”

java.sql has been in the JDK for over twenty years. Clear SQL and one record per row go further than we usually think.

Old truth

“Never touch security”

The JDK already has the cryptographic primitives. Password hashing built on top of them and tested against official test vectors isn't magic – it's diligence.

05 · A suggested order

Turn the whole question around

The first post suggested an order that ended with “let the specialist take it”. What if you turn it around? Instead of asking when we're allowed to build it ourselves, we ask when we really have to borrow.

1. Is it in the platform?The JDK and the browser can do far more than we usually think. Always start there.→
2. Can we write it strictly?If the behaviour can be described clearly and everything else can be rejected, it can be written – and AI writes it fast.→
3. Can we test it against the best?Run the same input through your own code and through Jackson or Tomcat. The mature libraries become the answer key instead of the foundation.→
4. Only then: borrowIf none of that works, take on a dependency. But do it as an exception, not a reflex.

06 · What we'd gain

Take back control of your system

This isn't about a prettier dependency tree. It's about who gets to decide over your system: you, or whoever maintains library number 47 in the lockfile.

If we own it ourselves…We get…And we're spared…
The HTTP serverA strict parser we can read from start to finishEmergency patches for code we've never seen
JSON handlingVisible mapping to our own typesThe whole class of deserialization bugs
SecurityFull insight into how login and sessions workConfiguration magic nobody on the team understands
The frontendCode that runs exactly as it was writtenBuild chains, bundlers and framework migrations
The whole stackA bill of materials with one line: JDK 25Vendor lock-in and licensing questions

07 · The dream

A system that outlives its developers

Imagine a booking system for a municipality. It's built once, properly, and then it's just allowed to live. No forced upgrade every three years. No consultant who has to come in to lift the framework. The code lives in the municipality's own repository, and anyone who wants to understand it can read it, all the way down.

That isn't how public systems usually work today. But not because it's impossible. It's because writing everything yourself has been too expensive. And that's exactly the cost that is disappearing.

The best dependency is the one that never needs updating.

08 · Where it leads

Stop apologising for building it yourself

For a long time, “we built it ourselves” has sounded like a confession. Something you say a little quietly, with an explanation afterwards. It doesn't have to be that way any more.

When code gets cheap, it suddenly becomes possible for a single person to own their whole stack, from HTTP parsing to signals in the browser. That isn't a step back to how we did things before open source. It's something new: as free as writing everything yourself, almost as cheap as borrowing.

We stopped building it ourselves because it was expensive. It isn't expensive any more. So why did we stop?

09 · A small disclaimer

Okay, okay. There are problems.

Jackson, Tomcat and Spring Security have been attacked by the whole world for fifteen years, and Spola's code hasn't. When the same tool writes both the code and the tests, a green build only means the code does what the tests say. Cryptography like JWT is still an area that calls for great care. And Spola is version 0.x, with security parts that haven't yet been reviewed by a human – don't use it to protect anything real. All of this can be solved with external testing, comparisons against the reference libraries and a human review. But it needs doing.

This is a tribute, not a recipe. It's a bit naive, and that's the point. Objections are welcome – but do also share which old truth you'd like to put to the test yourself.