Pages

Tuesday, July 13, 2010

Inversion of Control

A common issue faced by enterprise application builders is how to fit together different elements, such as web controller architectures with DB interfaces, when they were built by different teams with little knowledge of eachother. IoC literally inverts control so that instead of application code calling libraries, libraries call the application code based on events occurring.

A good example of early IoC is the change in UIs, from being controlled by the application workflow, to GUIs which are controlled by events.

Another term for IoC is dependency injection, introduced by Martin Fowler, which is explained as follows: "The basic idea of Dependency Injection is to have a separate object, an assembler, that populates a field in X class with an implementation for Y interface."

0 comments:

Post a Comment

 
Powered by Blogger