Guice and play and escaping DI hell
·
Part 4
Guice and Play, part 4: teaching Guice to build what it can't
A Provider class for the MongoDB client, a @Provides method for the database, and @Named qualifiers for two clocks of the same type, with the real errors Guice prints when I get it wrong.
25 Oct 2026
·
5 min read
·54 views
Guice and play and escaping DI hell
·
Part 3
Guice and Play, part 3: eager doesn't mean at boot
A MongoDB client as an eager singleton, closed by an ApplicationLifecycle stop hook. Why sbt run printed nothing until the first request, and why my tests built three clients.
25 Oct 2026
·
5 min read
·45 views
Guice and play and escaping DI hell
·
Part 2
Guice and Play, part 2: the moment Guice can't guess
A test that could not pass forced my first trait into the graph. @ImplementedBy, a root Module, a test that builds the real Guice graph, and the error Guice prints when a binding is missing.
23 Oct 2026
·
5 min read
·64 views
Guice and play and escaping DI hell
·
Part 1
Guice and Play, part 1: I deleted my wiring file and Guice built the graph
At work I wire Play apps by hand with the cake pattern. In my own projects I switched a Play 3 template to Guice: one deleted config line, one @Inject(), and a timestamp that made me think Guice was broken.
23 Oct 2026
·
6 min read
·50 views
Scala and the JVM
·
Part 10
Scala's Cake Pattern, One Dependency at a Time
I rebuilt Scala's Cake Pattern as a small checkout application, then traced its component traits, self-type requirements and test wiring from a Java and Spring perspective.
20 Sep 2026
·
5 min read
·127 views