this post was submitted on 04 Apr 2024
65 points (98.5% liked)
Rust
5999 readers
23 users here now
Welcome to the Rust community! This is a place to discuss about the Rust programming language.
Wormhole
Credits
- The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
AspNetCore works very much the same.
The mediator pattern is a little different though. It doesn't talk to the service directly.
The controller creates a request object and passes it to the mediator. The mediator finds the correct handler and invokes it. The result is then returned to the controller.
It essentially completely decouples the controller from the service.
Ah, makes sense. Thanks!