A small dependency injection container with simple support for factories, parameters and the environment while autowiring.
-
Updated
Jul 28, 2023 - PHP
Dependency injection (DI) is an implementation of the dependency inversion principle with the aim of separation of concerns by separating the depndency's implementation from the class that's using it. That kind of abstraction makes it possible to have different implementations with the same public methods so the class using it, doesn't need to care which of the implementations is used. This is also especially useful for unit testing.
There are different types of dependency injection:
A small dependency injection container with simple support for factories, parameters and the environment while autowiring.
Simple example of an IoC Container for DI example with Java language.
Dependency injection library for JS/TS projects
A simple Java app demonstrating the various ways to perform depedency injection via a setter and via a constructor using Spring Framework [annotations and xml file methods].
Fully-typed dependency injection modules
dependency inversion principle cpp example [soliD]
A TypeScript library leveraging decorators to provide a dependency injection mechanism.
Simple and easy-to-use Dependency Injection (DI) solution for Swift inspired by JSR-330
PHP Constructor Dependency Injection Container
.NET Core 7 MVC Web App demonstrating Dependency Injection
A dependency injection library providing an inversion of control container written in TypeScript
Dependency Injection Container Compiler for TypeScript
Showcase for "Dump Dependency Injection" for iOS apps.
Learn Dagger 2 step-by-step! Master dependency injection in Android development. From manual injection to advanced topics like custom scopes and subcomponents, our comprehensive tutorials cover it all. Level up your skills and build efficient, well-organized apps.
The Kotlin implementation of Slik: A lightweight dependency injection framework
A light-weight Java dependency injection library written in Kotlin
Created by Martin Fowler
Released January 23, 2004