Is it a DDD application or domain service?

Iโ€™m kind of new to the whole domain-oriented statement, and I would love it if you could tell me where, in your opinion, there is such a service method as at the application or domain level:

List<Children> getChildrenByParent(Parent parent, int offset, int count) {

   return repository.listChildrenByParent(Parent parent, int offset, int count);
}

I also wonder if it is acceptable to do things when there are huge collections of objects in the model and / or when I need to filter things efficiently.

thank

+3
source share
2 answers

The list of methods does not seem to make sense. Why do we need the getChildrenByParent method, which exactly transfers repository.listChildrenByParent? This is already in the right place - in the repository. Just use repository.listChildrenByParent where you need it.

+5
source

- (, ..). , , . U

+2

Source: https://habr.com/ru/post/1774122/


All Articles