Maybe I should stop reading stuff about #DDD (=Domain Driven Design). I read https://thevaluable.dev/anemic-domain-model/ and now I question so many parts of previously written code. I again want to experiment and get a feeling on how this might work out.
I probably should read "Domain-Driven-Design" from Eric Evans again and again.
How does it work for you? How do you handle situations where you learn something new and need to give it a try? How do you handle your old code?
I probably should read "Domain-Driven-Design" from Eric Evans again and again.
How does it work for you? How do you handle situations where you learn something new and need to give it a try? How do you handle your old code?
Anemic Domain Model vs Rich Domain Model with Examples
The comparison between adding the behavior of your domain to your entities (rich model) or to services (anemic model).Matthieu Cneude
Florian Geierstanger likes this.
Simon Praetorius
•Concerning refactoring I usually leave the old code as-is if it doesn‘t have a lot of links to other parts of the application that use the new way. Also, the new way might be the old way soon again. For example if you read the heated arguments in the blog post‘s comments. 😄
Daniel Siepmann likes this.
Daniel Siepmann
I currently think that it is more important to have a single structure than to have the current best implement. And I also believe it is a bad idea to try out things on customer projects. It is better to have some small pet project to experiment.
2 people like this
Florian Geierstanger and Krisztina Hirth like this.
Simon Praetorius
•I tried some new ideas in customer projects in the past. Some went very well, some… not so much. In my experience, an early failure in a client project is still better than long isolated development in a pet project. It‘s probably an individual decision to make. 🤷🏼♂️
Daniel Siepmann likes this.
Alexander Schnitzler
•But I have to say that I don’t do everything 100% by the book and continue to learn what‘s possible and sensible.
Domain events: Design and implementation
learn.microsoft.comDaniel Siepmann likes this.
Daniel Goerz
•In more complex applications, I use (context aware) DTOs when retrieving Data from a request or from the Database. I also use DTOs to be handed to the view sometimes.
My Domain Models have factory methods that take those DTOs as an argument and the domain logic lives in the Models.
Daniel Siepmann likes this.
Daniel Siepmann
DaFrank
•Daniel Siepmann likes this.
DaFrank
•Daniel Siepmann likes this.
Dan Leech
•Dan Leech
•Daniel Siepmann likes this.
Helmut Hummel
•This means I automatically try new things in the current project, being it side, customer or OSS.
It does NOT mean rewriting everything from scratch over and over again or trying things that does not scale with the problem to solve.
My priorities:
1. solve the problem
2. make the code easy to change
(easier said than done)
Daniel Siepmann likes this.
2 people reshared this
Daniel Siepmann and Daniel Gohlke reshared this.
Daniel Siepmann
Helmut Hummel likes this.