Tuesday, February 17, 2009

6 months of DDD !

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

  1. 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.
  2. Conditional checks (and logic) spread out. For e.g. a series of if-else checks with certain domain logic happening in each block.
  3. Large domain classes (in terms of LOC)
  4. All logic mainly in entities. No other kinds of domain objects (Value Objects, Services or specifications) were to be found.
  5. 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.

Technorati Tags: ,

Subscribe to comments for this post

Clicky Web Analytics