クリーンアーキテクチャとは?
クリーンアーキテクチャは、システムを同心円状のリングとして配置し、エンタープライズルールとアプリケーションルールを中心に、framework、データベース、インターフェースを外側に置きます。依存性のルールでは、ソースの依存は上位のポリシーに向かって内側にのみ向けられます。外側のレイヤーは、中核のビジネスロジックの変更を強いることなく変更できます。
なぜ重要か
framework やインフラの選択を端に留めておくことで、ビジネスルールを書き換えることなくそれらを置き換えられます。中核は安定し、独立してテスト可能なままになります。
関連ガイド
What Is Onion Architecture?Onion architecture layers an application around a central domain model, with each outer ring depending only o…
What Is Hexagonal Architecture?Hexagonal architecture isolates core application logic from external concerns through ports, with adapters co…
What Is Dependency Inversion?Dependency inversion is the principle that high-level modules and low-level details should both depend on abs…