3 ms·
I look at JDK codebase it has about 360 factory classes. I look at popular Java project: Gradle, it has about 350 factories. My project at work has about 50 fac
by geodel 9y ago
I look at JDK codebase it has about 360 factory classes. I look at popular Java project: Gradle, it has about 350 factories. My project at work has about 50 factories.
I agree that Factory* is not Java's fault. However I think Factory phenomenon did not start with corporate IT but by people working on core JDK or big open source projects.
- jmull 9y agoI should clarify: I don't have a problem with the factory pattern. I have a problem with piling abstractions and indirection on top of abstractions and indirection to create spaghetti systems. I don't know how EventFactoryFactoryFactory is being used but it looks like we're dealing with four levels of abstraction simultaneously, which seem likely to me to be a horrible failure of design. (I'm kind of assuming this isn't an event planning system, or something, and that "event" is an abstraction for something happening.)