3 ms·
In the past, when mentoring developers that tend towards god-objectery, they tended to avoid creating service objects because their mental map of the problem ha
by donw 12y ago
In the past, when mentoring developers that tend towards god-objectery, they tended to avoid creating service objects because their mental map of the problem had a one-to-one correlation between "objects" and "the physical problem domain" (e.g., Users, Accounts, etc.)
Given how much I've seen this sort of stuff in the wild, I felt it would be a useful article to hand off to new-ish developers (I'm the author).
It sounds like you're well beyond that, though, but thanks for reading nonetheless!
- zbyte64 12y agoSent this to a budding developer in our business. Thank you for the article. I too tend to think of objects as actors with contracts.
- donw 12y agoMy pleasure -- I'm glad it helped!
- KrisAndrew 12y agoIn GRASP this is called "Pure Fabrication" - a thing that is not directly modeled in the problem domain. Initially, adding a search method to Product seemed sensible by using "Information Expert" (another GRASP term), but when proceeding on to adding suggestions and requiring the User object, it begins to violate "Low Coupling". You have to "fabricate" another object to avoid the God object. http://en.wikipedia.org/wiki/GRASP_(object-oriented_design) http://en.wikipedia.org/wiki/GRASP_(object-oriented_design)