Mert Türkmenoğlu
1 min readApr 27, 2021

--

Thanks for the comment.

In the 2nd paragraph, I tried to emphasize a couple of important questions. Who should be responsible for instantiating an object, how can we manage our project when the number of dependencies grows, etc.

In the last sentence of the 3rd paragraph, I introduced DI as a solution for these questions. Explaining manual DI is out of the scope of this article, so I didn’t include an example for that. Instead, I tried to focus on explaining through a library. Maybe not explaining the more theoretical part of the topic may give you an impression of the “uselessness” of the principle. I can understand that.

The purpose of this article was to be an introduction to DI and how we can accomplish the simplest tasks with this principle. I tried to convey this message in the first sentence of the “Using TypeDI” chapter.

I didn’t quite understand what did you try to mean by saying “throw away all of the advantages of Node”. These principles are not here to throw away other technologies but to give more abstractions or conciseness. I can understand that not every project is suitable for every software development rule. These are just mere suggestions.

And lastly, one straightforward example for the advantages: Testability. Dependency Injection, and from a broader perspective, the dependency inversion principle is tightly coupled with the testability of software. Wikipedia page for DIP is a good entry point for further research.

I hope I understood you correctly and give you more understandable answers.

Thank you for giving me a chance to clarify myself.

--

--

No responses yet