---
title: "IoC: Dependency Injection vs Ambient Context"
description: "Published an article about choosing between Dependency Injection and Ambient Context when designing architecture."
date: 2025-03-04
display_date: "March 4, 2025"
image: "/img/brand/habr.webp"
image_alt: "IoC: DI vs Ambient Context"
---

# IoC: Dependency Injection vs Ambient Context

<zoom-img
            src="/img/brand/habr.webp"
            alt="IoC: DI vs Ambient Context"
            width="100px"
            style="float: left; margin: 15px 15px 0 0;"
    ></zoom-img>

My new article **"IoC: Dependency Injection vs Ambient Context"** was published on [Habr](https://habr.com/ru/articles/887646/). In it, I examine the architectural debate between Dependency Injection (DI) and Ambient Context.

The main idea: when choosing core technologies, it's important to maintain a sensible balance. I hold the position that more popular approaches are more reliable as they've been tested by many developers in production environments.

If you're designing a framework, modular architecture, or DI container - I recommend reading and discussing this article.
