Dependency Injection Smells - Speaking at the Dutch PHP Conference

Posted on by Matthias Noback

This week is Dutch PHP Conference week! It is something I'm very excited about. Three years ago I attended this conference for the first time. It was also my first time to visit any (PHP) conference at all, and this is a big conference, with lots of speakers, lots of attendees and multiple tracks. The Dutch PHP Conference (DPC) has a certain grandeur - many large rooms, many famous developers speaking. It is an inspiring event. Visiting the conference back in 2010 lit a fire in me to start investigating anything there was to know about writing good code: reusable, clean code, with well named, short and testable methods, readable and maintainable by others. In other words, I started being critical of the code I produced.

It's quite interesting for me to read a blog post I wrote back then on the Driebit Symfony blog. Many things have changed: I have my own blog about Symfony2, acquired some certificates, am writing a book about Symfony2, and have started as a freelance consultant. Not to mention that I've bought a house and formed a family!

Now, it's already very exciting to be an attendee, but this year I will also be speaking at the DPC about "Dependency Injection Smells". The idea for this talk originated from an earlier post with the same title. When reading some code in search of them I came to the conclusion that there are a lot of them! These are the smells that I will discuss this Friday:

  • Static dependency

  • Missing dependency auto-recovery

  • Hidden dependencies

  • Creation logic reduction

  • Factory methods

  • Programming against an implementation

  • Dependencies prohibited

And even this long list is not exhaustive. So, if you're coming to the conference, listen to my talk. Think about how you should design your classes, and how a class should handle its dependencies. Then afterwards introduce yourself, and tell me what you think.

P.S. Did you notice: this is a post with no code in it!

Talk PHP dependency injection Dutch PHP Conference