Typos and further change re comments

This commit is contained in:
happyaccidents
2013-11-29 09:46:15 +00:00
committed by Josh Lockhart
parent aaebe65095
commit 4bdbd868c3
2 changed files with 18 additions and 18 deletions

View File

@@ -4,11 +4,11 @@ isChild: true
## Containers {#containers_title}
The first thing you should understand about Dependency Injection Containers is that they are not the same thing as Dependency
Injection. A container is a convenience utility that helps us implement Dependency Injection, however, they can be and often
are misused to implement an anti pattern, Service Location. Using a container as a Service Locator within your classes arguably
creates a harder dependency on the container than the dependency you are replacing. It also makes your code much less transparent
The first thing you should understand about Dependency Injection Containers is that they are not the same thing as Dependency
Injection. A container is a convenience utility that helps us implement Dependency Injection, however, they can be and often
are misused to implement an anti-pattern, Service Location. Injecting a DI container as a Service Locator in to your classes arguably
creates a harder dependency on the container than the dependency you are replacing. It also makes your code much less transparent
and ultimately harder to test.
Most modern frameworks have their own Dependency Injection Container that allows you to wire your dependencies together through configuration.
Most modern frameworks have their own Dependency Injection Container that allows you to wire your dependencies together through configuration.
What this means in practice is that you can write application code that is as clean and de-coupled as the framework it is built on.