Bird
Raised Fist0

Given the following flow in Clean Architecture: UI calls Use Cases, which then call Entities. What is the correct order of dependency direction?

medium๐Ÿ“ Analysis Q13 of Q15
LLD - Advanced LLD Concepts
Given the following flow in Clean Architecture: UI calls Use Cases, which then call Entities. What is the correct order of dependency direction?
AUI -> Entities -> Use Cases
BEntities -> Use Cases -> UI
CUI -> Use Cases -> Entities
DUse Cases -> UI -> Entities
Step-by-Step Solution
Solution:
  1. Step 1: Understand dependency rule in Clean Architecture

    Dependencies always point inward, from outer layers to inner layers.
  2. Step 2: Apply to given flow

    UI depends on Use Cases, which depend on Entities, so direction is UI -> Use Cases -> Entities.
  3. Final Answer:

    UI -> Use Cases -> Entities -> Option C
  4. Quick Check:

    Dependency direction = UI to Entities [OK]
Quick Trick: Dependencies always point inward [OK]
Common Mistakes:
MISTAKES
  • Reversing dependency direction
  • Confusing which layer calls which
  • Assuming Entities depend on UI

Want More Practice?

15+ quiz questions ยท All difficulty levels ยท Free

Free Signup - Practice All Questions
More LLD Quizzes