在域驱动设计中遇到的主要问题/解决方案是什么?

时间:2022-08-31 12:41:51

What questions/solutions arise when Domain-Driven Design is practised?

实施领域驱动设计时会出现哪些问题/解决方案?

I have found getting a grasp of it somewhat difficult as new situations keep arising, so I am trying to compile a list of good resources/questions in one place to assist me and anyone alike me having trouble grasping/implementing it.

随着新情况的不断发生,我发现掌握它有点困难,所以我试图在一个地方编制一份好的资源/问题清单,以帮助我和任何一个人在抓住/实施它时遇到困难。

2 个解决方案

#1


Some questions you can find searching for the tags domain-driven-design or ddd here in SO. The book from Eric Evans also give some good insight of some situations you may face.

您可以在SO中找到搜索标签domain-driven-design或ddd的一些问题。埃里克埃文斯的这本书也对你可能面临的一些情况提供了一些很好的见解。

One important note is ddd is like tests, in the aspect that it increases development time of new features, but increase quality (and consequently, reduces development time in the long term). You might need constant contact with domain experts, so you can refine the model each time an issue appears.

一个重要的注意事项是ddd就像测试一样,它增加了新功能的开发时间,但提高了质量(从而缩短了长期开发时间)。您可能需要不断与域专家联系,因此您可以在每次出现问题时优化模型。

IMHO, the most important issue of ddd is having a good, meaningful domain. Most issues (though not all of them) root problem is poor understanding of the domain

恕我直言,ddd最重要的问题是拥有一个好的,有意义的领域。大多数问题(虽然不是全部)根本问题是对域的理解不足

It is difficult to say what issues are the most common, as for every domain is a different domain, with its own peculiarities...

很难说哪些问题最常见,因为每个领域都是一个不同的领域,具有自己的特点......

#2


In my experience, one of the top rules is "Build the Ubiquitous Language". Don't forget it, it's one of the most valuable aspects DDD provides to the development process. With a strong and shared ubiquitous language comes a meaningful domain and a shared vision of the problem that helps a lot.

根据我的经验,最重要的规则之一是“建立无所不在的语言”。不要忘记它,它是DDD为开发过程提供的最有价值的方面之一。凭借强大而共享的无处不在的语言,一个有意义的领域和对问题的共同愿景有很大帮助。

My second rule is "The model is only one": don't model data, objects, classes, tables... just face the domain an model it, everything else must be derived naturally from this model, there is no gap between a UML class in the model and the Java (or the language you are using) class.

我的第二个规则是“模型只有一个”:不要模拟数据,对象,类,表......只需要面对域模型吧,其他一切必须从这个模型中自然派生出来,之间没有差距模型中的UML类和Java(或您正在使用的语言)类。

#1


Some questions you can find searching for the tags domain-driven-design or ddd here in SO. The book from Eric Evans also give some good insight of some situations you may face.

您可以在SO中找到搜索标签domain-driven-design或ddd的一些问题。埃里克埃文斯的这本书也对你可能面临的一些情况提供了一些很好的见解。

One important note is ddd is like tests, in the aspect that it increases development time of new features, but increase quality (and consequently, reduces development time in the long term). You might need constant contact with domain experts, so you can refine the model each time an issue appears.

一个重要的注意事项是ddd就像测试一样,它增加了新功能的开发时间,但提高了质量(从而缩短了长期开发时间)。您可能需要不断与域专家联系,因此您可以在每次出现问题时优化模型。

IMHO, the most important issue of ddd is having a good, meaningful domain. Most issues (though not all of them) root problem is poor understanding of the domain

恕我直言,ddd最重要的问题是拥有一个好的,有意义的领域。大多数问题(虽然不是全部)根本问题是对域的理解不足

It is difficult to say what issues are the most common, as for every domain is a different domain, with its own peculiarities...

很难说哪些问题最常见,因为每个领域都是一个不同的领域,具有自己的特点......

#2


In my experience, one of the top rules is "Build the Ubiquitous Language". Don't forget it, it's one of the most valuable aspects DDD provides to the development process. With a strong and shared ubiquitous language comes a meaningful domain and a shared vision of the problem that helps a lot.

根据我的经验,最重要的规则之一是“建立无所不在的语言”。不要忘记它,它是DDD为开发过程提供的最有价值的方面之一。凭借强大而共享的无处不在的语言,一个有意义的领域和对问题的共同愿景有很大帮助。

My second rule is "The model is only one": don't model data, objects, classes, tables... just face the domain an model it, everything else must be derived naturally from this model, there is no gap between a UML class in the model and the Java (or the language you are using) class.

我的第二个规则是“模型只有一个”:不要模拟数据,对象,类,表......只需要面对域模型吧,其他一切必须从这个模型中自然派生出来,之间没有差距模型中的UML类和Java(或您正在使用的语言)类。