• 🎯 Entity classes/Models should not have behaviors and all behavior should go to interfaces or implementations (Service class) of those interfaces
    ➡ Example: Employee class will not have method to calculateTax()

models → won’t have any behavior → User
service → all behaviors → UserService

Entities should not have behavior. They represent data and data itself is passive.
Source — https://stackoverflow.com/a/5527174

  • 🎯 Check if SOLID principles are being followed
  • 🎯 Need particular subtype of an interface? → Factory design pattern
  • 🎯 Check if we need to make some classes singleton

--

--