DDD。网络项目上的战略设计有限环境
我从DDD开始,对DDD在Web项目中的应用有疑问。
如果我在Web项目的每个部分中都有多个有限的上下文。例如,电子商务项目中的“目录”和“购物车”。 �应该在哪里为所有网络实现前端并从许多有限上下文中提出概念的代码?
我已经考虑过创建“ Web”有限的上下文,但是这种有限的上下文将不会代表特定的普遍语言,因为该卑诗省将使用许多有界环境和子域的概念。
您对此有何看法?
谢谢。
I'm starting on DDD and I have a doubt on application of DDD on a Web Project.
If I have multiple Bounded Contexts for every section of a web project. For example, "Catalog" and "Shopping Cart" on a E-Commerce project. ¿Where should be the code that implements the frontend for all the Web and presents concepts from many Bounded Contexts?
I have thought about creating the "Web" Bounded Context, but this Bounded Context won`t represent a specific Ubiquitous Language because this BC will use concepts of many Bounded Contexts and Subdomains.
What you do think about this?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
该代码的位置取决于应用程序的结构。
DDD是一组模式和规则,可帮助您建模业务。该模型应该无处不在,这意味着不同的应用程序应共享相同的业务逻辑。 DDD的主要规则是描述业务在域中进行的内容,其他所有内容都不。 DDD并未说明如何构建应用程序,可以将其应用于任何体系结构。
您所描述的称为演示逻辑,并未描述您的业务逻辑。它描述了您的系统与客户的互动,这些客户是外部参与者,对您的应用程序而言是特定的:如果您制作了应用程序的网络或移动版本,则很可能您将具有相同的域实现,但您的演示逻辑会略有不同。因此,除了之外,没有DDD答案,没有在域中。
如果您制定了传统的3层应用程序,则此逻辑将在演示层中。
Where this code goes depend on the structure of your application.
DDD is a set of patterns and rules that helps you model your business. This model should be ubiquitous, meaning different applications should share the same business logic. The main rule of DDD is what describes the business goes in the domain, everything else does not. DDD does not state anything about how to you should structure your application, it can be applied to any architecture.
What you describe is called presentation logic and does not describe your business logic. It describes how your system interacts with clients, which are external actors and is specific to your application: if you make a web or a mobile version of your app, chances are that you will have the same domain implementation but your presentation logic will slightly differ. So, there is no DDD answer to where the presentation logic goes, besides not in the domain.
If you make a traditional 3-layered application, this logic goes in the presentation layer.