Modules in the Application Layer

We've seen Domain and Infrastructure modules, so now let's take a look at the Application layer. In Domain-Driven Design, we suggest using Application Services as a way of decoupling the client from both the Domain Model and the necessary knowledge on how to interact with it. As you'll see in Chapter 11,  Application, an Application Service is built with its dependencies, is executed with a DTO request, and returns a DTO response.

It can also use an output dependency to return the result:

               

Our suggestion is to create modules around Application Services. Each module will hold its request and response. If you're using the Data Transformer as an output dependency, follow the Infrastructure approach as you would with the UI.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset