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

看了很多架构,发现都没有针对每一层的“DTO”进行设计说明 #443

Open
youngledo opened this issue Aug 21, 2023 · 1 comment

Comments

@youngledo
Copy link

youngledo commented Aug 21, 2023

比如adapter层DTO、而app层有自己的DTO、domain层有model的DTO,这些都是没有区分请求和响应的DTO,即入参和出参没有详细的说明。示例中把不同类型的DTO放在一起也不是很合适,尤其是app层为何有request、response呢,这个不应该是adapter层的吗?再说了,当业务增多request和response的实体类也很多,分开定义也有很多好处,同时adapter层与app层的实体不一定是完全对应的,应该各自分开。
image

@RoyceZheng87
Copy link

我理解,adapter层应该用的是vo,传入app层之前是要进行vo->dto转换的。可实际项目中,往往vo的属性在dto中都有,传输的过程中就懒得转换了,adapter层的输入和输出也都是dto。

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