God Object
Updated 2026-07-30
Summary
A God object is an object in object-oriented programming that takes on too many responsibilities, serving as an anti-pattern. God objects typically appear in poorly designed systems.
Definition
An 'omniscient' class or module that controls too many functions in the system, contains too much data, and causes other parts to become empty shells with only data. Scaffold use: Beware of over-centralization of power. In an organizational structure, if the CEO micromanages everything (God object), not only will the CEO be exhausted (performance bottleneck), but subordinates will lose initiative (anemic model), making the entire organization extremely fragile and difficult to scale.
Introduction
How to use
Beware of over-centralization of power. In an organizational structure, if the CEO micromanages everything (God object), not only will the CEO be exhausted (performance bottleneck), but subordinates will lose initiative (anemic model), making the entire organization extremely fragile and difficult to scale.
Mechanism
High cohesion and low coupling are violated: responsibilities and states that should be distributed are concentrated into a single node, making it a 'single point of bottleneck + single point of failure'. Once this node changes or fails, it affects the whole; other modules degenerate into 'anemic' shells due to lack of autonomous logic. Complexity does not disappear; it is compressed into an unmaintainable focal point.
Practice
In progress 0/5Practice this model in one real situation:
Cases
- - Code: A Manager class that manages users, orders, and logs. - Organization: CEO approves all reimbursements and emails, becoming a bottleneck, and the team is unable to make decisions. - Anti-pattern: In microservices, a 'common library' that stuffs all shared logic, causing strong coupling.
Common pitfalls
- - For 'convenience', continue adding features to the God object, accumulating debt. - When splitting, cut too finely, falling into over-fragmentation. - Misjudging a reasonable 'coordinator' as a God object.
Sources
Source support: Explicit
References currently contain only Wikipedia links; primary sources still need review.
- zh.wikipedia.orghttps://zh.wikipedia.org/wiki/%E4%B8%8A%E5%B8%9D%E5%AF%B9%E8%B1%A1verified
account_treeGenealogyexpand_more
PRIVATE NOTES · Only visible to you
SAVED Q&A
ENTRY Q&A · Private saving available
Ask with a clear boundary
thinkingmodels answers from published entry context only.
Your question is sent to thinkingmodels. The answer uses public entry context only.