Timeline for Shifting from Anemic Domain Model to Rich Domain Model
Current License: CC BY-SA 4.0
7 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Oct 3, 2019 at 9:45 | comment | added | Flater | I think this answer is overcorrecting the issue. OP did go overboard by (at times) having the User class act as an empty shell around its repository dependency, but injecting the repository shouldn't be outright dismissed either. There are valid use cases, e.g. to assist with username validation (alerting if the username is already in use by someone else) | |
| Sep 3, 2019 at 8:05 | comment | added | Ewan | so do i in my example. when you move to a fat model your dto becomes the model | |
| Sep 3, 2019 at 8:05 | history | edited | Ewan | CC BY-SA 4.0 | edited body |
| Sep 3, 2019 at 8:03 | comment | added | Dot Net developer | In ADM, I take Dto as parameter in Service. So , I am having problem implementing it in Fat Model | |
| Sep 3, 2019 at 8:01 | comment | added | Ewan | @AntP I agree, but the OP has injected the repos. I think its a pretty common thing to do. | |
| Sep 3, 2019 at 7:59 | comment | added | Ant P | "I think its been pretty much proven that injecting the repos does nothing to help your code" - for me this is conflating concepts - the "fat domain model" should be concerned with logical operations on a logical model, repositories are persistence which is a different beast altogether and belong at an impure orchestration/service level. | |
| Sep 3, 2019 at 7:56 | history | answered | Ewan | CC BY-SA 4.0 |