2

I have a small side-project of about 3,000 sloc. I'm experimenting with building a DDD-like domain model into it, so I have more experience with this style for work. The project is centered around reading and writing a specific file format which has not changed for 20+ years. And I'd like others reading my code to be able to easily pick out parts of my encoding/decoding logic.

As I understand, persistence-ignorance is the major concept of DDD. Yet I'm having trouble picking out what persistence I'm supposed to be ignorant of. If my encoding/decoding logic is so central to the premise of the application that it has to be in the domain layer, what is left of the infrastructure layer?

asked May 3, 2017 at 11:16

1 Answer 1

4

I disagree "persistence-ignorance is the major concept of DDD". The major concept is to focus on the domain (hence the name). Since storage/persistence is not the core domain of most business application, persistence-ignorance is a common way of abstracting away irrelevant details for the core domain. But this does not apply to your case.

If the main purpose of the application is to read and write data in a specific format, then this is the domain of your application, and exactly what you should focus on.

answered May 3, 2017 at 12:17
1
  • 1
    The trick then is to see to it that storage/persistence remains the domain of your application. Things will go bad in a hurry if you start adding other concerns. Commented May 3, 2017 at 15:19

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.