Question

I have a question that twisted me over the last months. Some of the writers and persons (I would not say all of them) are associating the Business Logic with Application Services. According to what I know a business Logic contain the classes that form our Domain, which are contained all in the Business Layer or the Domain Layer.

So we put Business Objects in the Business Layer (that seems totally logical), so why are we associating Application Services (which belongs to the Service Layer) with the Business Logic (which belongs to Business Layer)? Why are we saying that an Application Service contains Business Logic?

Was it helpful?

Solution

In a layered architecture like the one you describe, the service layer will typically consume business logic components to fulfill a service contract. The service layer will be where the mapping from business objects to DTOs or Request/Response messages will occur. This ensures that changes in the business layer do not break service contracts.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top