News Feed
Jobs Feed
Sections




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

PHPBuilder.com:
Use Dice for Simplified PHP Dependency Injection
April 08, 2013 @ 13:04:46

On PHPBuilder.com there's a new tutorial showing how to use the Dice dependency injection container to manage dependencies in your application.

Dice is a Dependency Injection Container for PHP. It allows you to very quickly and simply use Dependency Injection techniques in your code with very minimal effort on your end.

The article talks some about the features of the Dice DIC and shares a simple introduction to its use in a more practical example. It uses constructor injection and type hinting to automatically handle the injections based on its current set of object references.

With Dice you don't have to worry about how the User accesses the Session object, you add it as a constructor parameter and it Just works. You don't need to reconfigure the container, you don't need to do anything at all. You just alter the constructor definition and everything is done for you.

You can find more details about Dice in this post (including more examples of it in action and a link to it's repository on github.

0 comments voice your opinion now!
dependency injection dice container tutorial github

Link: http://www.phpbuilder.com/articles/application-architecture/design/use-dice-for-simplified-php-dependency-injection.html

blog comments powered by Disqus

Similar Posts

Till Klampaeckel's Blog: Iterating over a table (with Zend_Db_Table and Zend_Paginator)

PHPBuilder.com: Creating an Online Survey - Part 2

Zend Developer Zone: Integrating Propel with the Zend Framework

TechTatva.com: [How To] Setup Cherokee with PHP5 FPM

Zend Developer Zone: Getting an OAuth Access Token from the Command Line


Community Events











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


composer hack component install security introduction hhvm series database opinion release framework package performance application facebook unittest symfony2 podcast language

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