Showing posts with label DI - Dependency Injection. Show all posts
Showing posts with label DI - Dependency Injection. Show all posts

Monday, February 23, 2009

Haacked: TDD and Dependency Injection with ASP.NET MVC

Great article on TDD, DI and MVC by Phil Haack:

Read article

Saturday, February 14, 2009

Inversion of Control - Dependency Inversion Principle - Castle's Windsor/MicroKernel

First, is the Dependency-Inversion Principle. Rather than the application being dependent on the blog services and the blog services dependent on the database, we have inverted the relationship. The details are no longer in control of the application. The database is dependent on the blog services and the blog services is dependent on the application, allowing us to plug-in various databases and blog services at will without touching the application.

http://codebetter.com/blogs/david.hayden/archive/2006/10/13/Inversion-of-Control-_2D00_-Dependency-Inversion-Principle-_2D00_-Castle_2700_s-Windsor_2F00_MicroKernel.aspx

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.

Manning.com / Dhanji R. Prasanna on DI

Dhanji R. Prasanna

In a traditional object-oriented application, a primary program controls secondary pieces of code, such as classes in a module, library, or framework. Dependency Injection (DI) is a technique that inverts this control, using an external mechanism to insert—or inject—a reference to an implementation of a service into an object. This allows you to build complex OO applications in a more testable, maintainable, and business-focused manner.

Wikipedia on DI

Dependency Injection (DI) in computer programming refers to the process of supplying an external dependency to a software component. It is a specific form of inversion of control where the concern being inverted is the process of obtaining the needed dependency.

Griffin Caprio on DI

..to inject objects into a class, rather than relying on the class to create the object itself.

Dependency Injection, MSDN Magazine

ARTICLE DISCUSSES:
What's wrong with tightly coupled architectures
Testing and dependency woes
Dependency inversion
Dependency injection