5 ms·
I can't help but disagree with so many of the things he says. I won't even go into things like "Does your customer know what an OrderPriceStrategyFactory is fo
by efdee 11y ago
I can't help but disagree with so many of the things he says.
I won't even go into things like "Does your customer know what an OrderPriceStrategyFactory is for? No, then it’s not a real thing. Its some bullshit you made up.", but statements like "If we change how we contact customers then only the customer needs to change, not also the ReportBuilder" sound overly simplistic to me. The whole point would be that nothing needs to be changed. You just write a new ReportBuilder that implements the same contract/interface and switch the wiring. No changes in the existing ReportBuilder or Customer classes.
That, or maybe I'm just completely misunderstanding what I'm reading. Which isn't entirely impossible :-)
- mjt0229 11y agoI don't think the author makes a good case for the problem with, for example, noun-verbers, other than that they aren't very OO. If OO means putting lots and lots of state into objects, then I'm happy to be the lunatic fringe. I like my objects as a unit of code organization and my value objects as simply that - an immutable representation of a value.
- to3m 11y agoEvery business will have an order price factory in it. Prices aren't just picked by the roll of a dice! If you're trying to model the inner workings of a business, you probably don't want to be starting with the customer's view of it...