DDD Infrastructure services

后端 未结 4 1616
小鲜肉
小鲜肉 2021-01-30 04:48

I am learning DDD and I am a little bit lost in Infrastructure layer.

As I understand, \"all good DDD applications\" should have 4 layers: Presentation, Application, Dom

4条回答
  •  一个人的身影
    2021-01-30 05:12

    An unfortunate thing about DDD is the word 'Service'. What it should be is 'Domain Service'. Think of the Domain as entities and value objects, while Services are a way of dealing with actions, operations and activities.

    As for the Repositories, they are just a facade that should behave like a collection to your domain. If you are using an ORM or writing your own, this is what all your domain objects should be going through in order to achieve persistence instead of those services directly.

提交回复
热议问题