{
    "content": "<h1>Inversion of Control (IoC)<\/h1><p><a href=\"..\/Inversion-of-Control\/\">Inversion-of-Control<\/a> is a high-level <a href=\"..\/Design-Principle\/\">Design-Principle<\/a> used in <a href=\"..\/Software-Engineering\/\">Software-Engineering<\/a> to increase the <a href=\"..\/Modularity\/\">Modularity<\/a> and extensibility of applications. In traditional procedural programming, the custom code is responsible for the flow of execution and the lifecycle of its dependencies. However, in an <a href=\"..\/IoC\/\">IoC<\/a> architecture, this flow is inverted: a <a href=\"..\/Framework\/\">Framework<\/a> or <a href=\"..\/Runtime-Environment\/\">Runtime-Environment<\/a> takes control of the execution flow and calls into the custom code when necessary.<\/p><p>The concept was significantly popularized by <a href=\"..\/Martin-Fowler\/\">Martin-Fowler<\/a>, who noted that <a href=\"..\/Inversion-of-Control\/\">Inversion-of-Control<\/a> is often implemented through <a href=\"..\/Dependency-Injection\/\">Dependency-Injection<\/a>, though it can also be achieved through the <a href=\"..\/Strategy-Pattern\/\">Strategy-Pattern<\/a>, <a href=\"..\/Service-Locator-Pattern\/\">Service-Locator-Pattern<\/a>, or the <a href=\"..\/Template-Method-Pattern\/\">Template-Method-Pattern<\/a>. By decoupling the execution of a task from its implementation, <a href=\"..\/Inversion-of-Control\/\">Inversion-of-Control<\/a> allows developers to write more flexible code that is easier to unit test using <a href=\"..\/Mock-Objects\/\">Mock-Objects<\/a>.<\/p><p>Prominent examples of systems utilizing this principle include the <a href=\"..\/Spring-Framework\/\">Spring-Framework<\/a> for <a href=\"..\/Java\/\">Java<\/a>, <a href=\"..\/Angular\/\">Angular<\/a> for web development, and various <a href=\"..\/Unit-Testing\/\">Unit-Testing<\/a> frameworks like <a href=\"..\/JUnit\/\">JUnit<\/a>. These systems manage the lifecycle of objects and automatically provide the necessary dependencies at runtime.<\/p><p>For more detailed technical specifications, refer to the <a href=\"https:\/\/martinfowler.com\/articles\/injection.html\">Martin Fowler Article on DI and IoC<\/a> or the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Inversion_of_control\">Wikipedia page for Inversion of Control<\/a>.<\/p><h3>Related Topics<\/h3><ul><li><a href=\"..\/Dependency-Injection\/\">Dependency-Injection<\/a><\/li><li><a href=\"..\/Software-Architecture\/\">Software-Architecture<\/a><\/li><li><a href=\"..\/SOLID-Principles\/\">SOLID-Principles<\/a><\/li><li><a href=\"..\/Design-Patterns\/\">Design-Patterns<\/a><\/li><\/ul>",
    "tags": [
        "ioc",
        "software-architecture",
        "dependency-injection",
        "design-patterns",
        "solid-principles",
        "decoupling",
        "modular-programming",
        "frameworks",
        "software-design",
        "programming-principles"
    ]
}