3 ms·
Never used or inherited such a design, but I'm curious about what practical problem you encoutered. Care to illustrate?
by raphinou 13y ago
Never used or inherited such a design, but I'm curious about what practical problem you encoutered. Care to illustrate?
- mercurial 13y agoOnce you have implemented this design pervasively, you can forget about reusing your code in another context. Because it is impossible to tell which part of the god object is needed in a given part of the code, you have to initialize everything in the god object. With a bit of luck, you're working in Java and mixing this anti-pattern with some Spring dependency injection, in order to make this mess really impossible to untangle. And obviously it encourages mixing up layers. Why have modularity when you can access your data access components from anywhere? And in general, circular dependencies are a code smell. Whenever I thought I needed to use them, I came to realize it was the wrong decision.