Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于依赖注入的问题 #35

Closed
hoo-ge opened this issue Jul 22, 2019 · 2 comments
Closed

关于依赖注入的问题 #35

hoo-ge opened this issue Jul 22, 2019 · 2 comments

Comments

@hoo-ge
Copy link

hoo-ge commented Jul 22, 2019

Lyric您好,我看您在4.0版引入了依赖注入的特性,我以前只是听做Java的朋友说过,但是从来没有用过。今天在重构4.0版里看见了这个特性,在阅读代码的时候发现没有以前版本的可读性高了,很多地方不理解。您能说说开发思路吗?引入了依赖注入对项目的优势是什么?谢谢

@LyricTian
Copy link
Owner

嗯,加入依赖注入的目的是解决各个模块间的依赖关系及繁琐的模块初始化过程,同时模块本身的初始化过程也会变得简单,不会出现改动一处影响多处的情况。

@hoo-ge
Copy link
Author

hoo-ge commented Jul 22, 2019

谢谢您的回复,我需要好好消化消化,信息量有点大。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants