News Feed
Sections




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

Paul Jones:
What Application Layer Does A DI Container Belong In?
February 12, 2014 @ 09:11:17

Paul Jones has a new post to his site today with his thoughts about where dependency injection belongs in the application layer structure.

James fuller asks: "any thoughts about which layer of the application we should be using a DI container like Aura.Di? Highest layer possible?" Twitter is too constrained and ephemeral for a good response, so I'll answer that question here.

Based around his definition of a dependency injection container (and service locator), he suggests that the DI container should reside outside of the normal application structure, possibly created in the bootstrap. He also talks some about class inheritance and the use of dependencies passed through from parent to child classes (and how common practices can break this).

0 comments voice your opinion now!
application layer dependency injection opinion auradi

Link: http://paul-m-jones.com/archives/5914

blog comments powered by Disqus

Similar Posts

PEAR Blog: PEAR2 standards, we would like to know what you think

International PHP Magazine: IPM Poll Question: The Most Common PHP Security Mistake Is?

Dave Hulbert: Thoughts on PSR-7

Job Posting: Ning Seeks Application Developers (Palo Alto, CA)

SitePoint PHP Blog: Debugging PHP (Spectator)


Community Events





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


podcast series configure interview version language opinion conference list api unittest release voicesoftheelephpant community introduction symfony framework laravel tool composer

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