O
O
oldhowl2018-12-27 11:34:13
OOP
oldhowl, 2018-12-27 11:34:13

What is the function of the Application Layer?

It's clear with the domain - we describe how everything is interconnected
with aggregates and interfaces. It's clear with the infrastructure - we implement interfaces
. Not very much with the application layer. What does it do besides mapping from DTO to aggregate?
Whatever examples I have not looked at, everything is different everywhere. Somewhere the application layer is not used at all.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
ApeCoder, 2018-12-27
@ApeCoder

I have Evans's book at hand, though a tongue-tied Russian translation.
There, this level is called "Operational" and it says "defines the tasks that the task must solve, and distributes them among objects that express the essence of the subject area."
The following is an example where a FundsTransferService is drawn at this level - which sends messages to account objects in order to conduct a bank transaction.
That is, in other words, this is the level of specific application of the domain area - the implementation of specific business operations, and it is to it that the user interface refers - in the example, it calls the transferTo method of the FundTransferService class, passing it account numbers,
I think this is what Uncle Bob's "Clean Architecture" level of use cases is:
"Use Cases
The software in this layer contains application specific business rules. It encapsulates and implements all of the use cases of the system. These use cases orchestrate the flow of data to and from the entities, and direct those
entities to use their enterprise wide business rules to achieve the goals of the use case. layer to be affected by changes to externalities such as the database, the UI, or any of the common frameworks.
We do, however, expect that changes to the operation of the application will affect the use-cases and therefore the software in this layer. If the details of a use-case change, then some code in this layer will certainly be affected."
Pay attention to the words "application specific" - we are talking about application-specific business rules.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question