What is the difference between domain logic and application logic?

Asked

Viewed 344 times

0

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

1 answer

1

In the 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 serving the business, is where it has entity validations, or some methods that do not require access to repository, do not make calls to the database.

The service class, is responsible for delegating, that is to say "serve" it is in it that will have the entity to make the check and after the return, if everything goes well it will delegate the method of saving in the repository for example.

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

https://pt.slideshare.net/rponte/entendendo-domaindriven-design

I hope I’ve helped.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.