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 pricingReal-world example
No real-world example available yet.
Unlock with a Pro subscription to view this section.
Upgrade to ProCommon mistakes
No common mistakes listed yet.
Unlock with a Pro subscription to view this section.
Upgrade to ProFollow-up questions
No follow-up questions available yet.
Unlock with a Pro subscription to view this section.
Upgrade to Pro