Skipping Application Services
Aside from the incoming ports, for certain use cases, we might want to skip the application layer as a whole, as shown in the following figure:
Figure 11.4: Without application services, we don't have a specified location for domain logic
Here, the AccountPersistenceAdapter class within an outgoing adapter directly implements an incoming port and replaces the application service that usually implements an incoming port.
It is very tempting to do this for simple CRUD use cases, since in this case an application service usually only forwards a create, update, or delete request to the persistence adapter, without adding any domain logic. Instead of forwarding, we can let the persistence adapter implement the use case directly.
This, however, requires a shared model between the incoming adapter and the outgoing adapter, which is the Account domain entity in this case, so it usually means that we are using the domain model as the input model as described...