by efdee · 11y ago · 0 comments
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 :-)
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...
I like my objects as a unit of code organization and my value objects as simply that - an immutable representation of a value.