View on GitHub

SARAFF SOFTWARE

All products / Saraff.IoC

Introduction

The terms Inversion of Control (IoC), Dependency Injection Principle (DIP), Dependency Injection (DI), and IoC containers may be familiar. But are you clear about what each term means? The following figure clears the confusion whether on they are principles or patterns.

As illustrated in the above figure, IoC and DIP are high level design principles which should be used while designing application classes. These are principles, so they only recommend certain best practices but do not provide any specific implementation details. Dependency Injection (DI) is a pattern and IoC container is a framework.

Let’s have an overview of each before going into details.

Inversion of Control Principle Dependency Inversion Principle Dependency Injection IoC Container