Inversion of Control

The term Inversion of Control ( IoC; German: "reverse control " or " control reversal " ) denotes an implementation paradigm, which applies, inter alia, in object-oriented programming.

This paradigm describes the operation of frameworks: a function of an application program is registered with a standard library and called by this at a later date. This is sometimes referred to as an application of the " Hollywood principle " means: " do not call us, we'll call you" ( in German: " Do not call us, we will call you " ): Instead of applying the control flow controls and only uses standard functions that control the execution of specific subroutines to the framework is given.

A simple example of such a reversal are listeners ( according to the Observer pattern ), but also Java applets and servlets follow this design pattern. Plug -ins and callback functions (callback ) are further examples for surrendering the control of individual program parts a ( Framework ) object.

Is also common in libraries that work with Dependency Injection (such as EJB container or the Spring framework ) to read of Inversion of Control. Here it goes but mainly to the generation of object nets.

415535
de