Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

程序结构划分疑问 #1

Open
Quiter2013 opened this issue Mar 11, 2020 · 1 comment
Open

程序结构划分疑问 #1

Quiter2013 opened this issue Mar 11, 2020 · 1 comment

Comments

@Quiter2013
Copy link

看了博主的代码,对于DDD程序结构有以下两个疑问

  1. 按照DDD的分层结构,为什么在你的工程里面是直接在Service层就对外暴露接口了呢
  2. 基础层在工程中没有体现
    以上两个疑问,不知是否可以给以说明
@banq
Copy link
Owner

banq commented Mar 12, 2020

服务直接暴露接口作为API,是一种简单做法,在复杂案例情况下,两者最好分离。
基础层只有仓储Repostiory层,复杂项目中基础层包括消息中间件。由于是简单案例,直接使用仓储层默认作为基础层。
这个案例主要展示订单聚合的实现,不是完整DDD架构实现,完整DDD+六边形架构可参考jivejdon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants