2 ms·
You presumed before you even started design that there would be such a thing as an order, which would be implicated in shopping, payment, and tracking. There c
by erikpukinskis 9y ago
You presumed before you even started design that there would be such a thing as an order, which would be implicated in shopping, payment, and tracking.
There could also be separate order, invoice, and delivery.
Essentially your question is: what if my models are highly overloaded? Won't they need to be used in multiple places?
And of course the answer is yes. But if you are using the same model in dramatically different contexts you probably have a problem of another sort. This is the dreaded "One Object To Rule Them All" OO anti-pattern.