3 ms·
Once 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
by mercurial 13y ago
Once 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.