“It's terrible to have to depend on someone else.”
— Jeff Lindsay, Dearly Devoted Dexter
“I'll talk for a while and hope sufficiently to provoke and inflame opinion that there'll be an outburst of chair-throwing at the end.”
— Douglas Adams
“Dependency injection is a software design pattern that allows the removal of hard-coded dependencies and makes it possible to change them, whether at run-time or compile-time.”
“Put simply, a Service is any PHP object that performs some sort of "global" task. It's a purposefully-generic name used in computer science to describe an object that's created for a specific purpose (e.g. delivering emails).”
— Symphony Framework on DI
“Easy, I'll just add more if / else in the controller.”
“Everything should be made as simple as possible, but not simpler.” - Albert Einstein
In object-oriented computer programming, a factory is an object for creating other objects.
“Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.”— Brian Kernighan
You are now free to start hurling the chairs around!