October 13, 2005
In defense of the nearly tautologic diagram
Where was the meat? I read and reread the definition, examined the flimsy code snippets carefully, stared at the nearly tautologic diagrams for roughly 10 minutes, trying to grasp the deeply profound idea but failing.
Aside from having snorted coke through my nose over
Car extends Vehicle OOP tutorial.
Aristotle is right when he says that the concept of dependency injection should be so ubiquitously understood that it shouldn't get its own brand name. But at the same time it represents the very essence of object-orientation and most people are not using it. How many times have you hacked around a library because it won't let you inject behavior? Once you've swallowed the pill, the world's ignorance of dependency injection is almost too much to bear.
I also think the more important of Fowler's postulations is not to understand dependency injection, but to use it with a persistence that borders on the religious. Consequently employing DI everywhere is actually a new methodology. Anyone who ever tried dependency injection as their default way of doing business knows that it is plain impossible with vanilla language constructs. Without assistance from a DI container you're just going to die the death of the million parameter constructor.