Explore >> Select a destination


You are here

fusectore.dev
| | sookocheff.com
2.5 parsecs away

Travel
| | Inversion of Control (IoC), also known as Dependency Injection (DI), allows an object to define their dependencies as constructor arguments (strictly speaking, you can set these dependencies as properties, but the examples I will use today are constructor-based). This is the inverse of the object itself controlling the instantiation or location of its dependencies, hence the name Inversion of Control. Let's look at an example from Stackoverflow using a text editor with a spell checking component:
| | conradakunga.com
2.6 parsecs away

Travel
| | This is Part 8 of a series on dependency injection.
| | daniel-siepmann.de
1.7 parsecs away

Travel
| | Explanation of how Dependency Injection works for TYPO3 Extbase (prior TYPO3 CMS v10).
| | tomasvotruba.com
32.3 parsecs away

Travel
| While working with legacy projects, I often encountered this anti-pattern of misusing repositories. Instead of easy-to-inject service, projects are locked into a service locator. This makes code hard to upgrade and locks your project heavily to the Doctrine ODM packages. And there are plenty of them. Each extra package bites off its share of upgrade costs. Today, we look at how to refactor the ODM service locator to independent services and separate your project from ODM. We also get a few advantages in strict type coverage.