DEV Community

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

Collapse
 
ashkanmohammadi profile image
Amohammadi2

Actually, it seems like you're more interested in the data itself rather than the way it is parsed (json, csv, sql, ...), therefore it should be an application service that helps with concern of parsing the file. You can also define an interface with a method like parse and depend on the interface rather than the actual implementation. This gives you the possibility to add more parsers (json parser, yml parser, ...) in the future (if you need to)