News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Fabien Potencier's Blog:
Do you need a Dependency Injection Container?
March 30, 2009 @ 11:13:48

Following up on the previous part of his dependency injection series (the first part), Fabien Potencier has come back with this second look at the development technique asking if you really need a dependency injection container in your scripts.

In the first installment of this series on Dependency Injection, I have tried to give concrete web examples of Dependency Injection in action. Today, I will talk about Dependency Injection Containers. First, let's start with a bold statement: Most of the time, you don't need a Dependency Injection Container to benefit from Dependency Injection.

A dependency injection container is a wrapper around classes/libraries that need certain types of objects and settings to make them work correctly. This wrapper gathers together the information the object inside needs automatically without the user of the library having to worry they've missed something. Several code examples are included showing an application both with and without the container.

0 comments voice your opinion now!
dependency injection container need requirements object library


blog comments powered by Disqus

Similar Posts

DevShed: PHP 5 Helpers: Calling Methods Out of Object Scope

DevShed: The Basics of Implementing Adapter Objects with PHP

Dave Marshall's Blog: Landing a PHP job Part 1: Technical Knowledge and Skills

Pierre-Alain Joye's Blog: Build cairo on windows, step #1

Fabien Potencier's Blog: Create your own framework... on top of the Symfony2 Components (part 12)


Community Events

Don't see your event here?
Let us know!


series language community php7 api list voicesoftheelephpant introduction laravel wordpress laravel5 opinion interview unittest extension library version podcast framework release

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework