Friday, August 28, 2009

What is IoC

IoC stands for Inversion-of-Control. IoC is a concept,and an associated set of programming techniques, in which the control flow is inverted compared to the traditional approach. "In other words, the framework calls the procedures created by the programmer, rather than programmer calling the procedures or methods of the framework. IoC is based on the "Hollywood Principle." The Hollywood Principle says "Don’t call me, I will call you."

IoC is used to 'inject' dependencies at runtime. When one uses this pattern, the dependencies of a particular object are not satisfied at compile time. Instead, the framework provides the required dependencies to the object at runtime. Thus, this pattern releases the programmer from the chore of providing all the dependencies at compile time.

No comments:

Post a Comment