洋葱架构是否包含SOLID原则? [英] Does onion architecture include SOLID principles?

查看:105
本文介绍了洋葱架构是否包含SOLID原则?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在阅读并了解如何通过遵循SOLID和CRAP原则更好地设计应用程序项目。我很了解CRAP原则。然而,在研究时,我遇到了洋葱建筑的概念,我很难绕过2个设计概念和两者之间的差异/相似之处,如果有的话?



洋葱架构项目是否包括SOLID原则?一种方法是否与另一种方法相关?



我尝试过的方法:



如果有人可以简单解释这两个概念之间的关系,那将非常有帮助。谢谢。

解决方案

如果我认为Onion有助于强制执行S(单一责任),并且由于层之间的接口或合同,它强烈支持两者L(Liskov替换)和I(界面隔离)。

像大多数环境,框架和理论一样,O(开放/封闭)和D原则归结为设计师



您可能会发现以下博客有用:

洋葱建筑。拯救SOLID原则的软件架构 [ ^ ]

清洁架构| 8th Light [ ^ ]

I am reading and learning on how an application project could be designed better by following the SOLID and CRAP principles. I am quite comfortable in understanding the CRAP principles. However, while researching, I came across the concept of Onion architecture and I am having difficulty wrapping my head around the 2 design concepts and the differences/similarities between the two, if any?

Will an Onion architectured project include the SOLID principle(s)? Does one approach correlate to the other?

What I have tried:

If someone can briefly explain the relation between the two concepts it would be really helpful. Thank you.

解决方案

If anything I believe Onion helps enforce the "S" (Single Responsibility), and because of the interfaces or contracts between the layers it strongly supports both the "L" (Liskov substitution) and the "I" (Interface segregation).
Like most environments, frameworks and theories the "O" (Open/closed) and "D" principles are down to the designer

You may find the following blogs useful:
The Onion Architecture. The software architecture to the rescue of the SOLID principles[^]
The Clean Architecture | 8th Light[^]


这篇关于洋葱架构是否包含SOLID原则?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆