领域驱动设计的缺点?

发布于 2024-10-19 22:34:15 字数 88 浏览 9 评论 0原文

我可能有一个关于 DDD 的愚蠢问题: DDD 通常有什么缺点吗?我的意思是,除了在没有必要或需要时使用它之外。 (例如小型/不复杂的项目)

谢谢

I might have a silly question about DDD:
Are there any disadvatages of DDD generraly? I mean, besides of using it when it is not necessary, or needed. (e.g. small/not complex projets)

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

冰雪梦之恋 2024-10-26 22:34:15

很容易做错。

It is very easy to do it wrong.

初雪 2024-10-26 22:34:15

Eric Evans 在 JavaOne 演示中表示,当业务领域存在大量复杂性时,DDD 最适用。此外,他明确指出 DDD 不适合解决技术复杂性很高但业务领域复杂性很小的问题。后者的一个例子是一个嵌入式系统,其输入非常简单(可能与其拥有的状态数量无关),同时呈现出大量的技术复杂性(在让硬件工作方面)。

我们如何量化很多一点,这是一个开放的话题。但这种叙述应该作为 DDD 何时何地最适用的指南。

-- 编辑 --

我通过 Emule 获得了视频演示,但我从未在 YouTube 或类似视频场所找到相同的讲座。

Eric Evans has said in a JavaOne presentation that DDD is best applicable when there is a lot of business domain complexity. Moreover, he explicitly states that DDD is not suitable for problems where the is substantial technical complexity but that has little business domain complexity. An example of the later is an embedded system with very simple inputs (possibly independent of the number of states it possesses) while simultaneously presenting a lot of technical complexity (in terms of getting the hardware to work.)

How we go about quantifying a lot or a little, that's an open subject. But the narrative should work as a guideline of when and where DDD is best applicable.

-- edit --

I got the video presentation through Emule, and I've never been able to find that same lecture on youtube or similar video venues.

猥︴琐丶欲为 2024-10-26 22:34:15

我在 Microsoft 应用程序架构指南中找到了关于 DDD 的讨论有助于理解该特定风格的挑战:

由于该软件的核心是
领域模型,这是一个直接的
这种共同语言的投射,
让团队快速找到差距
在软件中通过分析
围绕它的语言。创建一个
共同语言不仅仅是一种
练习接受信息
领域专家并应用它。
很多时候,沟通问题
开发团队内部不应该
只是误解了语言
的域,但也由于
事实上该域的语言是
本身就含糊不清。领域驱动
设计过程不仅持有目标
实现该语言的方法是
使用,但也在改进和提炼
域的语言。这在
反过来有利于软件
构建,因为该模型是直接的
领域语言的投影。

为了帮助维护模型
一个纯粹且有用的语言结构,
你通常必须实施一个伟大的
隔离和封装处理
在域模型内。最后,
基于领域驱动设计的系统
可能需要相对较高的成本
虽然领域驱动设计提供了
许多技术优势,例如
可维护性,应该应用
仅适用于复杂领域
模型和语言过程
提供明显的好处
复杂信息的交流,
并在制定共同的
对领域的理解

I found this discussion of DDD in the Microsoft Application Architecture Guide to be helpful in understanding the challenges of that particular style:

As the core of the software is the
domain model, which is a direct
projection of this shared language, it
allows the team to quickly find gaps
in the software by analyzing the
language around it. The creation of a
common language is not merely an
exercise in accepting information from
the domain experts and applying it.
Quite often, communication problems
within development teams are due not
only to misunderstanding the language
of the domain, but also due to the
fact that the domain's language is
itself ambiguous. The Domain Driven
Design process holds the goal not only
of implementing the language being
used, but also improving and refining
the language of the domain. This in
turn benefits the software being
built, since the model is a direct
projection of the domain language.

In order to help maintain the model as
a pure and helpful language construct,
you must typically implement a great
deal of isolation and encapsulation
within the domain model. Consequently,
a system based on Domain Driven Design
can come at a relatively high cost.
While Domain Driven Design provides
many technical benefits, such as
maintainability, it should be applied
only to complex domains where the
model and the linguistic processes
provide clear benefits in the
communication of complex information,
and in the formulation of a common
understanding of the domain
.

◇流星雨 2024-10-26 22:34:15

在一次意大利会议上,我谈到了这个主题(请参阅这些幻灯片)。

DDD 项目需要领域专家,但聘请这些专家的成本往往很高,因为他们拥有宝贵的知识(请阅读,如果您不需要领域专家,那么您就不需要 DDD)。
此外,DDD 需要建模者具备强大的技能。特别是,他们必须:

  1. 谦虚,因为他们必须接受自己的无知并向专家学习
  2. 真正精通 OOP
  3. 勤奋,因为他们必须跟踪决策
  4. 善于沟通,因为他们必须向其他开发人员解释该领域(即使通过文档) )

找到这样的开发人员可能比预期的要贵得多,因为经过几个月的尝试后你才能真正知道他们擅长这项工作。

At an italian conference, I talked about the topic (see these slides).

DDD projects require domain experts that are often expensive to hire, since they hold valuable knowledge (read, if you don't need a domain expert, you don't need DDD).
Moreover DDD requires strong skills on the modeler side. In particular they have to be:

  1. Humble, since they have to accept their ignorance and learn from an expert
  2. Really skilled in OOP
  3. Diligent, since they have to track decisions
  4. Comunicative, since they have to explain the domain to the other devs (even through documentation)

Finding such developers can be much more expensive than expected, since you can really know that they are good at the job after some months of trials.

贱人配狗天长地久 2024-10-26 22:34:15

Martin Fowler 在他的“PoEA”书中对何时以及使用什么域逻辑模式进行了精彩的讨论。

例如,最简单的模式事务脚本不涉及域模型。

Martin Fowler in his "PoEA" book has a great discussion of when and what domain logic patterns to use.

For instance, simplest pattern, Transaction Script, involves no domain model.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文