Created
June 18, 2025 17:36
-
-
Save trikitrok/07580367f29198fcea8b967508da1143 to your computer and use it in GitHub Desktop.
with notifications coupling is reduced
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 EventPublisher eventPublisher; | |
| // ... code omitted for brevity | |
| public void execute() { | |
| // business logic to process an order (code omitted for brevity) | |
| // ... | |
| // notification of the event that an order has been processed | |
| eventPublisher.publish(createOrderProcessedEvent()); | |
| } | |
| // ... code omitted for brevity | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment