Differences between revisions 3 and 5 (spanning 2 versions)
Revision 3 as of 2008-11-15 14:00:25
Size: 1457
Editor: localhost
Comment: converted to 1.6 markup
Revision 5 as of 2013-11-23 13:37:52
Size: 1457
Editor: tkadm30
Comment: Spam
No differences found!

Dependency Injection Pattern

The Dependency Injection Pattern, is described in Martin Fowler's article. It is closely related to the DependencyInversionPrinciple and the so called Inversion of Control (IoC) containers.

IoC is aimed at loosening the coupling of application components. The key concepts are:

  • Components do not know each other directly.
  • Components specify external dependencies using some kind of a key.
  • Some "superior instance" (the IoC container, for example) resolves the dependencies once for each component and hereby "wires" the components together.

It is quite a challenge to implement an IoC container for statically typed languages. In python, however, the core concepts can be implemented quite easily. DependencyInjectionThePythonWay describes how.

See Also

PEAK:InversionOfControl -- Inversion of Control is a more general concept (small components relinquishing control, or networking control, rather than maintaining it internally,) but the name was overloaded historically to mean what is named by DependencyInjectionPattern. PEAK makes use of dependency injection, and the larger meaning of "Inversion of Control." The target page describes dependency injection.


DependencyInjectionPattern (last edited 2013-11-23 13:37:52 by tkadm30)

Unable to edit the page? See the FrontPage for instructions.