We have been learning and trying to use DDD in our project for the last 6 months. Meanwhile I got involved in a couple of other projects involving lucene, axis etc and had not looked at this code for quite some time.
I finally pulled in the sources to see how DDD had turned out and also find out if it was indeed helping in increasing the expressibility of code.
Some of the things that jumped out immediately were
- The request DTOs had seeped into the domain classes with certain domain methods that are called from service layer, accepting the request objects as inputs.
- Conditional checks (and logic) spread out. For e.g. a series of if-else checks with certain domain logic happening in each block.
- Large domain classes (in terms of LOC)
- All logic mainly in entities. No other kinds of domain objects (Value Objects, Services or specifications) were to be found.
- Mostly all entities have a shallow hierarchy structure. I am being generous here more than 90% of entities had no hierarchy.
We would now have to see how best to clean this up. Will keep you posted on how it goes.
No comments:
Post a Comment