Accelerider.Windows icon indicating copy to clipboard operation
Accelerider.Windows copied to clipboard

Prism 框架关于IOC 的应用

Open yuyue5945 opened this issue 5 years ago • 4 comments

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like A clear and concise description of what you want to happen.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Add any other context or screenshots about the feature request here.

请教一下作者,在框架中,发现对IOC的应用场景较少,没有 Infrastructure.Interface 项目 的概念,看到层与层的引用蛮紧耦合的,请教一下,您在这块的设计思路是什么,十分感谢

yuyue5945 avatar Jul 31 '20 08:07 yuyue5945

能不能据具体一点的例子?我一年多没更新这个项目,都忘了……

DingpingZhang avatar Jul 31 '20 12:07 DingpingZhang

能不能据具体一点的例子?我一年多没更新这个项目,都忘了……

image 你的程序里,都是直接引用实现类,这样是不是程序就没有没有解耦 对IOC 了解不深哦,感觉使用IOC 的目的,就死为了接口、实现分离 现在没有接口项目,是不是就意味着,解耦度不够 学习一下您的想法

yuyue5945 avatar Aug 05 '20 01:08 yuyue5945

Group依赖NetDiskInfrastructure是合同库,当然所有项目都要引用的。 你看Accelerider.Windows就没有引用GroupNetDisk,是靠动态加载的。

关于IoC,你把Prism文档看一下就可以了,不是很复杂的东西,没必要讨论的。只要不看国内博文,就会很简单。

DingpingZhang avatar Aug 06 '20 16:08 DingpingZhang

能不能据具体一点的例子?我一年多没更新这个项目,都忘了……

image 你的程序里,都是直接引用实现类,这样是不是程序就没有没有解耦 对IOC 了解不深哦,感觉使用IOC 的目的,就死为了接口、实现分离 现在没有接口项目,是不是就意味着,解耦度不够 学习一下您的想法

这个肯定用了IOC,你看看代码就知道了,这里面用的是Unity这个类库。

laosandegudai avatar Mar 06 '21 04:03 laosandegudai