Skip to main content
1 of 3
Ewan
  • 79.9k
  • 5
  • 83
  • 179

I think the DDD answer is the first one. Put the logic in the domain object. Inject services if required.

I would have another 'hosting layer' to convert the incomming message to the domain object

The application layer would use domain objects to achieve the required effect.

However. I don't think DDD fits the servive pattern very well. In my mind the logic often belongs to the service, not the domain object.

Ie. I would have RecordPlayer.PlayRecord(record) rather than Record.Play()

Ewan
  • 79.9k
  • 5
  • 83
  • 179