Closed FerdinandSu closed 12 months ago
Hello,I want to learn more about the potential need for dependency injection in specific classes. For example, do class like IOServer requires DI? Could you please provide more details on the specific components or classes of the project where dependency injection is needed?
Hi @yrris
Yes, basic components also needs DI. The SuitClient class and similar types shall be removed, and all dependencies should be injected instead of initialized manually.
MobileSuit has already adapted to DI fully, so you can take a reference at https://github.com/Plastic-Metal/MobileSuit/blob/main/src/SuitHostBuilder.cs line 119.
However, the two projects are now very different, and you may not be able to find suitable counterparts for some types in MobileSuit. At the same time, implementing full dependency injection support can require considerable work.
I think we can start small and only consider basic component injection of the IOServer and the centralized types it depends on, so that you can raise your first PR and complete your homework.
If you need further help, please let me know. However, I’m not familiar with Java, so you may need to refer to the internet for technological support.
Please note that the ownership of this repo has been changed.
Please don't hesitate to ask me questions; also, leave comments before you start your work to avoid duplicated work.
如果你有任何疑问,欢迎留言询问我;请在开始前在此留言,防止他人进行重复的工作。
Hi, I'm the developer of this Program, but I don't have enough time to make my program perfect. I'll appreciate it if you can help me improve it and become a contributor. Here is an existing issue:
This project lacks support for Dependency Injection, please help me add it.本项目目前缺乏依赖注入支持。Thanks to the great contributions made by @yrris at #21 , now we have a real Dependency Injection system based on Spring Framework.The next steps are: