4 ms·
My problem with blog posts on SOLID (like this one) is they overcomplicate ideas that should be simple. This entire article could be replaced with: - When tryi
by trevor-e 9y ago
My problem with blog posts on SOLID (like this one) is they overcomplicate ideas that should be simple. This entire article could be replaced with:
- When trying to make code testable, it's easier to configure from the outside than inside.
There's no need to mention other topics like factories, DI containers, etc. All of those are obvious abstractions on top of the very simple idea.
- marcosdumay 9y agoThey are only obvious after you see them. My only criticism is about articles that confuse the principle with the means you use to obtain it. Yes, do talk about factories and containers, but separate them from the principle and keep in mind that there are many other ways to get it. You don't need a DI container. Besides, it only provides you an specific kind of testability, that may or may not be the best way to test your code.