Dependency Inversion

  • ◷ 6 min
  • Beginner
  • 7 steps

The rules should not depend on the database. Turn the arrow around with a simple promise.

Arrows rules → database code
1
Storages
1
Changes in the rules
—
  • Rules
  • Database code
  • Promise (interface)
  • Test store