> When learning Object Oriented Design in a school setting, the discussion usually goes something like this:
> “This is a picture of a dog. What things can a dog do? Bark, eat, run, walk, these are its methods. What are some things that describe a dog? It is soft, brown, has 4 legs. These are its properties”
> “Purely behavioural code should be kept at a minimum at the boundaries of your domain layer, mostly to interface with the richer world of Nouns.”
> I like to refer to this object modelling advice as “Find the Nouns”, and it is wrong
This article describes a very different approach to OOP.
I wrote a similar article not so long ago: https://sobolevn.me/2019/03/enforcing-srp
Post #721
2.96K