So maybe Amazon S3 should not be treated as a persistence technology, but rather as a generic external service, next to EmailSender, Currenc圜onverter etc. On the other hand - in this domain Blob is definitely not an aggregate root - it is always used as a part of Illustration aggregate. So I would have a BlobRepository where I could store artwork data. Domain Driven Design is a vision and approach for dealing with highly complex domains that is based on making the domain itself the main focus of the project, and maintaining a software model that reflects a deep understanding of the domain. Amazon S3 is a kind of database (please don't start the flame what is a true database here ) ), just different than SQL and I think that it should be abstracted like so, that means by a Repository. Now I wonder how should i design the persistence of Blobs. Also, I would want to save some scaled-down or thumbnail versions of the artwork so I introduced a Blob entity in many-to-one relationship with Illustration for representing the binary data of the artwork in various versions. Domain-Driven Design: Tackling Complexity in the Heart of Software. That entity contains some data about the artwork and is persisted in a SQL database while the artwork itself is persisted on Amazon S3. Lets say I have an Illustration entity which is an aggregate root.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |