DEV Community

Discussion on: Is file parsing a domain operation in DDD?

Collapse
 
bhserna profile image
Benito Serna

In my opinion you should start by writting the application service and do the parsing there...

Collapse
 
piczmar_0 profile image
Marcin Piczkowski

That also make sense, but usually when I do a DDD I start with domain and create hexagonal architecture (ports and adapters) and with this approach I came to conclusion that I just care about a list of domain objects and don't care yet how they will be provided (by CSV or JSON or other means) which still leads to your answer that CSV parsing remains in application service.

Collapse
 
bhserna profile image
Benito Serna

Interesting... I usually start from the application layer and that helps me to decide what should be part of the domain. For me is easier start with the things that are more concrete ... but well, each person solves the problems in different ways =)