Software Design - Inversion of Control

> Code - (Programming|Computer) Language > ( Information System | Software ) Design - Art of Programming

1 - About

Inversion of Control (IoC) is a design pattern that addresses a component’s:

It suggests that the control of those three component should not be the concern of the component itself. Thus it is inverted back

The most significant aspect to IoC is dependency resolution. Dependency mis-management is acknowledged to be the biggest problem that IoC is trying to solve.

The control of the program is inverted when the control is moved away from the component (ie a web forms for instance) to a framework.

In software engineering, inversion of control (IoC) describes a design in which the written code receive the flow of control from the reusable library.

A software architecture with this design inverts control as compared to traditional procedural programming:

  • in traditional programming, the code calls into reusable libraries to take care of generic tasks,
  • but with inversion of control, it is the reusable code that calls into the code.

The term is related to but different from the dependency inversion principle, which concerns itself with decoupling dependencies between high-level and low-level layers through shared abstractions.

3 - Benefits

Inversion of control is used to increase modularity of the program and make it extensible

4 - Documentation

Advertising