Can I put all Application Services to the front end in DDD?

526 Views Asked by At

As what I read from some articles on Domain Driven Design, the Domain Services are to ensure the logical integrity of the domain and may call other domain services for external things.

So, can I assume that, in a web application of separated front end and back end, even if the client side is not believable, as long as Domain Services can ensure that no business rule would be broken, I can put all Application Services to the front end?

If the answer is yes, is it reasonable that putting all Application Services to the front end would help reduce the load of the server and simplify the hierarchy (since the front end itself needs a service layer) for there would be no Application Service layer in the server side? Would there be security problems?

1

There are 1 best solutions below

4
Roman Weis On

You can and you should keep the application layer as thin as possible and prevent any leaks of the domain model to the application layer. But I don't think that you can remove the application layer from the backend completly, because you need to have at least some persistence logic in there.