All tags / #dependency-injection

#dependency-injection

3 posts

DI factories with toFactory: the service that couldn't decide

Peter Amiri

A storage service had to pick S3 in production and the local disk in dev. The to() binding couldn't express that, so the decision leaked into every caller. toFactory() gives a DI container a *how* — and it's the difference between one closed arrow and ten open switch statements.

One-line session auth, and the three bugs you won't find the hard way

Peter Amiri

The enableSession() facade is one line of config. But the real story is the three subtle bugs it exists to prevent — the ones that only surface after the second deploy, or only on a reload, or only for a user who was already logged in. Here's what happens when the wiring goes right.

From WireBox to wheelsdi — The Framework Gets Leaner

Peter Amiri

Wheels 4.0 decomposes the framework's rim against the CFML engine, pulls dependency injection and the test runner in-house as wheelsdi and WheelsTest, and breaks the monolithic boot sequence into discrete phases. Nothing a user of the framework notices at the surface. Everything a contributor notices when they try to add the next feature.

Newsletter

Release notes and new posts, once a month. No spam.

Prefer RSS? Subscribe to the feed →