4 ms·
I'm late to the party, but I read all the comments and I think yours is the best. DCI is a powerful design concept in any class-based language. When behavior
by dasil003 14y ago
I'm late to the party, but I read all the comments and I think yours is the best.
DCI is a powerful design concept in any class-based language. When behavior gets complex, DCI is the cure for the "kingdom of nouns" that results from a beginner-level understanding of how to apply OOP. In short, DCI is a way to elevate business tasks to first-class citizens.
The singleton method business is purely an aesthetic concern. It definitely makes for more appealing code, but at the cost of an order of magnitude performance hit. All else being equal I love elegant code as much as the next rubyist, but this is simply too high a price to pay and I'm shocked that so many people find this acceptable.