How to avoid the God Object in DI (Facade Services vs Over-injection)?

Updated Apr 28, 2026

Short answer

A God Object acts as a central repository for everything, often resulting from wrapping dozens of dependencies into a single injected 'Context'.

Deep explanation

While creating a Facade to reduce constructor parameters is good, a God Object is bad because it lacks cohesion. It violates the Interface Segregation Principle. A consumer should only be forced to depend on exactly what it uses. Split God objects into tightly focused, cohesive Aggregate Services.

Unlock with a Pro subscription to view this section.

View pricing

Real-world example

No real-world example available yet.

Unlock with a Pro subscription to view this section.

Upgrade to Pro

Common mistakes

No common mistakes listed yet.

Unlock with a Pro subscription to view this section.

Upgrade to Pro

Follow-up questions

No follow-up questions available yet.

Unlock with a Pro subscription to view this section.

Upgrade to Pro

More Dependency Injection interview questions

View all →