Click here to Skip to main content
15,887,746 members
Articles / Programming Languages / C# 7.0

Inversion Of Control IOC with Containers (aka Dependency injection)

Rate me:
Please Sign up or sign in to vote.
3.45/5 (6 votes)
20 Apr 2020CPOL7 min read 6.1K   43   8  
Concept and implementation of Inversion Of Control, aka IOC through Dependency Injection (DI)
Inversion Of Control is a very powerful pattern as part and/or on top of the strategy pattern for loose coupling. Not only do you separate implementation from the interface (Strategy pattern), but you also invert the control of what the implementation should be. The control is no longer part of the "using" object, but control of implementation is inverted to an extern system (mostly, object containers, initialized by a using program). The container injects the implementation dependencies into all using objects that need an implementation for their required interfaces.

Views

Daily Counts

Downloads

Weekly Counts

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Architect Roos ICT Architectures
Netherlands Netherlands
Roland is an experienced, hands-on architect on modern (micro-)services orientation.
All modern OO-oriented platforms, C# DotNet, Java Spring Boot, Python and C++ have his interest. He is experienced in all those platforms.
Architectures, patterns, concepts and frameworks are more important than tooling and languages, after all. You should apply a tool, platform or language in a modern micro-service, because it fits best to the problem at hand. Not because you're most familiar with itSmile | :) .

Comments and Discussions