Dependency inversion: confirming an order
Make the business code own the interfaces it needs, and let the infrastructure plug into them.
Level Intermediate
What you will see
- Who chooses the mailer?
- Glued to the infrastructure
- The checkout owns the interface
- Receive, don't create
- One place to choose
- When to keep it concrete
Before / after
Base: dependency-inversion-base-goView the diff