Did you know? DZone has great portals for Python, Cloud, NoSQL, and HTML5!

John Esposito curates content at DZone, while writing a dissertation on ancient Greek philosophy and raising two cats. In a previous life he was a database developer and network administrator. John is a DZone Zone Leader and has posted 268 posts at DZone. You can read more from them at their website. View Full User Profile

PHP 5.3/5.4 best practices tutorial: dependency injection

10.29.2011
Email
Views: 3695
  • submit to reddit

One common problem developers often face is: how best to handle dependency injection (DI)? especially (for web developers) in an age when web technologies are changing at breakneck speed.

As with many bad programming practices, avoiding dependencies is often the faster route. When deadlines matter -- and they always do -- faster often seems better, even when you know there's a better way.

That's why it's important to keep refining your DI skills. That's why Fabien Potencier made this slideshare on dependecy injection in PHP 5.3/5.4:


 

If you're already comfortable with the concept, you might skip to slide 54, which gives you less tutorial and more results. Otherwise, take a few minutes to click through the whole presentation and potentially save many hours months down the road.

Published at DZone with permission of its author, John Esposito.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)