O'Reilly logo
  • Wenliang Dang thinks this is interesting:

Inversion of Control explained

IoC is a design principle that decouples objects of an object-oriented program from their dependencies (collaborators), that is, the objects they work with. Usually, this decoupling is achieved by externalizing the responsibility of object creation and Dependency Injection to an external component, such as an IoC container.

This concept is often compared to the Hollywood principle, "Don't call us, we will call you." In the programming world, it recommends the main program (or a component) not to instantiate its dependencies by itself but let an assembler do that job.

This immediate...

From

Cover of Spring MVC: Designing Real-World Web Applications

Note

解释控制反转[IoC]比较清楚的几段话