软件开发原则之依赖倒置原则
发布日期:2021-09-20 08:07:45 浏览次数:58 分类:技术文章

本文共 352 字,大约阅读时间需要 1 分钟。

转载自:

依赖倒置原则(dependence inversion principle DIP)

定义:Hight level modules should not depend upon low level modules. Both should depend upon abstractions. Abstractions should not depend upon details. Details should depend upon abstractions.

翻译一下意思是:高层模块不应该依赖低层模块。二者应该都依赖抽象模块。抽象模块不应该依赖细节。细节应该依赖抽象。

概括成一句话就是:高层模块、低层模块、细节都只应该依赖抽象层。

 

好,那么什么是高层模块,低层模块,什么是抽象和细节呢?

转载地址:https://blog.csdn.net/caiyiii/article/details/20489127 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:什么是主题酒店?
下一篇:html5 特性介绍

发表评论

最新留言

路过按个爪印,很不错,赞一个!
[***.219.124.196]2024年03月21日 09时20分16秒