依存関係逆転の法則とは コアのロジックが実装の詳細に依存しないようにして、モジュール間を疎結合にしましょうという原則。 Wikipediaでは以下のように説明されている。 上位モジュールはいかなるものも下位モジュールから持ち込んではならない。双方とも抽象(例としてインターフェース)に依存するべきである。 "High-level modules should not import anything from low-level modules. Both should depend on abstractions (e.g., interfaces)." 抽象は詳細に依存してはならない。詳細(具象的な実装内容)が抽象に依存するべきである。 "Abstractions should not depend on details. Details (concrete implementations