3 ms·
Compared to just creating your own dependencies inside a class and not writing interfaces, IOC adds a great deal of complexity.
by withinboredom 6y ago
Compared to just creating your own dependencies inside a class and not writing interfaces, IOC adds a great deal of complexity.
- ivanche 6y agoYou don't have to write interfaces to have dependency injection. You can and should declare all your dependencies as constructor parameters. If you create them inside a class you'll permanently lock the two together, thus making it a testability nightmare.