News Feed
Sections




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

Brandon Savage:
The "D" Doesn't Stand For Dependency Injection
August 13, 2013 @ 11:03:55

Brandon Savage has a new post to his site that tries to clear up a misconception about the SOLID set of principles for software development. He points out that, despite some comments to the contrary, the "D" doesn't stand for "Dependency Injection".

You've probably heard of the acronym SOLID by now, which is an object oriented programming paradigm consisting of five basic (but interrelated principles) of object oriented development. And you've probably heard once or twice that the D in SOLID stands for Dependency Injection. Actually, if you're lucky you've also heard what it really stands for, which is the Dependency Inversion Principle. But, in PHP, this is often conflated with dependency injection. I'm here to tell you today that dependency injection is only one piece of the overall puzzle in understanding this crucial principle.

He talks about the actual definition of the "D", dependency inversion, and how it relates to the concept of "dependency on abstractions." He includes some sample code to help make his point - one showing classes with dependencies on one type of object, another showing a dependency on an interface instead.

0 comments voice your opinion now!
solid oop development dependency inversion principle injection

Link: http://www.brandonsavage.net/the-d-doesnt-stand-for-dependency-injection

blog comments powered by Disqus

Similar Posts

PHP.net: PHP 5.6.0beta1 released

NETTUTS.com: 10 Biggest Milestones in Web Development

PHPBuilder.com: Use Dice for Simplified PHP Dependency Injection

Mike Purcell's Blog: Symfony - PHP - Possibly Forking 1.x so Invested Companies donít Lose Millions

PHPImpact Blog: Zend Framework Automatic Dependency Tracking


Community Events





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


bugfix interview opinion symfony framework community voicesoftheelephpant laravel api install deployment release podcast package library introduction tips list series language

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