DEV Community

Discussion on: Top 10 Object-Oriented Design Principles for writing Clean Code

Collapse
 
mindplay profile image
Rasmus Schultz

Dependency injection is not only the last followed principle, it also should be the #1 principle - I've seen the code style and quality of an entire team improve substantially after teaching them DI, IOC and how DI containers work.

So many OO concepts fall into place once you really understand this :-)

Collapse
 
wangvnn profile image
wangvnn • Edited

Alan Kay once said that he did not foresee any things like these with OO. That does not mean DI, IOC are not good. Maybe we just need to call it something else like dependency driven design rather than calling its OO principles. OO is too far from Alan's original idea and land to a place where we deal with classes and their dependencies rather than objects themselves. I am just wondering.

Thread Thread
 
Sloan, the sloth mascot
Comment deleted