Timeline for In DDD, is it worth it to define a Bounded Context for file access?
Current License: CC BY-SA 4.0
7 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Dec 10, 2020 at 19:21 | comment | added | Andreas Hütter | DocumentId is just a proposal for the name. The important thing is, that from how understand from your problem description, that this is really about documents existing in the problem domain of your business. Like a word document is known to the users of Microsoft Word. So I guess there is also some kind of identification of a document which the user of your desktop application is opening and saving to. So I do not understand why such an identification is not DDD-compliant. The value object can also be DocumentName or whatever makes sense in your domain. | |
Dec 7, 2020 at 8:22 | comment | added | Loïc Morvan | If entities are considered as document, then the DocumentId would directly be the identity of the entity, isn't it? In practice, your solution may be totally useful. However, I have the feeling that adding a DocumentId property is not strictly DDD-compliant. | |
Dec 4, 2020 at 16:45 | comment | added | Andreas Hütter | I guess the entities known to your business are some kind of documents, not files. I rephrased the value object to DocumentId. When you hydrate your document aggregates from the data source (here a filesystem) you do not need to know anything about files. I was assuming that anyway. So your aggregate would be something like Document maintained in the document repository. Only the repository implementation knows about files. When you want to switch to another data source you can simply change the concrete repo implementation leaving the repo interface including the DocumentId value object as is | |
Dec 4, 2020 at 16:39 | history | edited | Andreas Hütter | CC BY-SA 4.0 |
added 4 characters in body
|
Dec 4, 2020 at 16:13 | comment | added | Loïc Morvan | Indeed, this removes the need for using the file path as the identity. However, I'm anticipating the day when we don't want to manage files anymore, in favor of cloud resources for instance. So I'm wondering if can get rid of any aspect of the file in our BCs. | |
Dec 4, 2020 at 10:59 | history | edited | Andreas Hütter | CC BY-SA 4.0 |
added 47 characters in body
|
Dec 4, 2020 at 9:42 | history | answered | Andreas Hütter | CC BY-SA 4.0 |