A facade-style API exposes intended operations while hiding a domain module’s entities, repositories, and other implementation details. This reduces design-time coupling between modules and makes clients easier to test. section 6.2.3
Credit operations between domain modules
An Order Domain Module can call a ConsumerService interface to reserve or release credit instead of using the Consumer entity and ConsumerRepository directly. The Order module can then mock that service in tests. section 6.2.3
Prefer collaboration through APIs, but weigh modularity against implementation effort and query efficiency: a cross-module SQL query may be a pragmatic exception. section 6.2.3
Figure 6.12 The ConsumerService facade encapsulates the implementation details of the Consumer Domain Module and reduces design-time coupling. Moreover, an Order Domain Module can easily mock the ConsumerService facade.
Shows how the ConsumerService facade hides implementation details and reduces coupling. section 6.2.3
