What is the difference between domain logic and application logic?

0

How do I know if I should put the method in the class itself or in the BO of the class? When to know the difference of domain logic and application logic? Note: I was left with the doubt after read this article

    
asked by anonymous 27.03.2017 / 03:29

1 answer

1

In DDD, we have the domain classes, which are our entities, our objects, and we also have the service classes.

The domain class is responsible for servicing the business, it is where it has entity validations, or some methods that do not require repository access, do not make calls to the database.

The class of service, is responsible for delegating, ie "serve" is in it that will have the entity do the verification and after the return, if everything works out it will delegate the method of saving in the repository for example.

It has a slideshare that is well chewed, and worth checking out.

link

I hope I have helped.

    
27.03.2017 / 23:04