4 ms·
Love this series. In OOP always ask what should be the object when modelling the domain: often it's not an object like dog or cat but something like a rule or r
by brewmarche 2y ago
Love this series. In OOP always ask what should be the object when modelling the domain: often it's not an object like dog or cat but something like a rule or relation, to use the same example it could be a PlayRule (is this dog allowed to play with this cat, do they get along?), or whatever your problem demands (it's also interesting to observe that the terms dogs and cats are pretty vague, we could be talking about software for a vet or a shelter or a taxonomist, once you talk about the relation it seems to become more specific)