Timeline for Avoiding the Anaemic Domain - How to decide what single responsibility a class has
Current License: CC BY-SA 3.0
4 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jun 26, 2013 at 10:16 | comment | added | Michael Borgwardt | @thecapsaicinkid: if they all operate on the same Employee data and only on that data - lovely! High cohesion, low coupling, that's exactly what you want. Don't over-apply the SRP to the point where it leads to fragmented code. | |
Jun 26, 2013 at 10:03 | history | edited | Michael Borgwardt | CC BY-SA 3.0 |
added 2 characters in body
|
Jun 26, 2013 at 10:00 | comment | added | SeeNoWeevil | Holiday and sickness calculations seem like completely separate responsibilities to me. Both have separate business reasons to change. It's very likely the business would change one and not the other. In this example there's only 2 operations but that could easily be 5 or 6 that operated on the same Employee data but were clearly more than a single responsibility. Which one belongs to the employee? The decision seems arbitrary. | |
Jun 26, 2013 at 9:42 | history | answered | Michael Borgwardt | CC BY-SA 3.0 |