Billy McCafferty on DI (CodeProject) ~ Don't Call Us - We'll Call You

Wednesday, February 11, 2009

Billy McCafferty on DI (CodeProject)

Billy McCafferty:

"Dependency Injection" (DI), also more cryptically known as "Inversion of Control" (IoC), can be used as a technique for encouraging this loose coupling. There are two primary approaches to implementing DI: constructor injection and setter injection. Obviously, at some point, something must be responsible for creating the concrete objects that will be injected into another object. The injector can be a parent object, which I'll call the "DI controller", or can be externalized and handled by a "DI container" framework. What follows is a brief overview of the various approaches for using dependency injection techniques.

No comments:

Post a Comment