Last active
June 18, 2025 17:37
-
-
Save trikitrok/58d85160a78b8fb8b365155c448bccec to your computer and use it in GitHub Desktop.
without notifications: direct coupling to may collaborators
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ProcessOrder { | |
private EmailService emailService; | |
private InventoryService inventoryService; | |
private LogisticsService logisticsService; | |
private AccountingService accountingService; | |
// ... code omitted for brevity | |
public void execute() { | |
// business logic to process an order (code omitted for brevity) | |
// ... | |
// secondary behaviours associated to an order that has been processed. | |
emailService.sendOrderConfirmation(orderDto); | |
inventoryService.updateStock(orderDto); | |
logisticsService.scheduleDelivery(orderDto); | |
accountingService.recordTransaction(orderDto); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment