This is part 2 of my http://silk.codeplex.com/ review.
In docs there is no mention about DDD or CQRS. That’s great because app seems to be fairly simple and CRUD should suffice. But when you look at folder structure this pops up:
Going into MileageStats.Model and looking through the classes – they look very anemic. Looking through how the classes are used reveals it is used as a domain model.
Now MileageStats.Domain even more interesting:
There is another model:
Mighty handlers of doom
Let’s go back to MileaseStats.Domain.Handlers. Name implies there is some kind of messaging(commands/events or cqrs even?) right? Let’s have a look at AddFillupToVehicle:
Hmm, these handlers have a lot of business logic, but according to Greg Young :
The responsibility of these commandhandlers is to execute the appropriate behavior on the domain.
The command handlershould not be doing any domain logic itself. If there is a need for this than that logic should be moved into a service of its own.
And also to do validation:
That “Using” part is also interesting but that’s a topic for a next post.