Just looking to gain some understanding...

77 views
Skip to first unread message

Brian Sanders

unread,
Feb 28, 2018, 12:39:47 PM2/28/18
to DDD/CQRS
Greetings,
I'm interested in decomposing a monolith and I wanted to present a specific model and would appreciate answers that don't only say "it depends". What  might it depend on? It's ok to make assumptions and speculate. The application supports multiple enterprises. Each enterprise is kind of like a tenant, but not exactly. A Company, for example, might belong to an Enterprise, but can also access certain data for another Enterprise if they are permitted to. Each Enterprise may have data that is specific to them. Unit of Measure, for example, is one such piece of data. To one enterprise, Pallet might be applicable. But to another, could be completely irrelevant. Unit of Measure is a piece of data that can be used in different ways. One might be entering a product specification that details what the ingredients are . Someone else might also be inspecting product from a shipment and describing how many boxes of a certain produce were rejected. Unit of Measure could also be categorized (Temperature, Weight, Mass, etc...). Should "Unit of Measure" be an aggregate? Should it be part of the Enterprise aggregate? What about UOM Category/Type? What if I need to reference (for lack of a better term) the data? Based on my limited understanding of DDD, I think they are Value Objects. Thanks in advance for your responses!

Peter Hageus

unread,
Mar 1, 2018, 3:55:01 AM3/1/18
to ddd...@googlegroups.com
What is the behaviour of the system, what processes are you capturing? Dataentry? Do you need aggregates at all in that case, aren’t there just events?

UoM sound more like configuration data to me, used as value objects in the actual domain. I can’t see how they can have behaviour in themselves.

/Peter

On 28 Feb 2018, at 17:43, Brian Sanders <briansan...@gmail.com> wrote:

Greetings,
I'm interested in decomposing a monolith and I wanted to present a specific model and would appreciate answers that don't only say "it depends". What  might it depend on? It's ok to make assumptions and speculate. The application supports multiple enterprises. Each enterprise is kind of like a tenant, but not exactly. A Company, for example, might belong to an Enterprise, but can also access certain data for another Enterprise if they are permitted to. Each Enterprise may have data that is specific to them. Unit of Measure, for example, is one such piece of data. To one enterprise, Pallet might be applicable. But to another, could be completely irrelevant. Unit of Measure is a piece of data that can be used in different ways. One might be entering a product specification that details what the ingredients are . Someone else might also be inspecting product from a shipment and describing how many boxes of a certain produce were rejected. Unit of Measure could also be categorized (Temperature, Weight, Mass, etc...). Should "Unit of Measure" be an aggregate? Should it be part of the Enterprise aggregate? What about UOM Category/Type? What if I need to reference (for lack of a better term) the data? Based on my limited understanding of DDD, I think they are Value Objects. Thanks in advance for your responses!

--
You received this message because you are subscribed to the Google Groups "DDD/CQRS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dddcqrs+u...@googlegroups.com.
Visit this group at https://groups.google.com/group/dddcqrs.
For more options, visit https://groups.google.com/d/optout.

Brian Sanders

unread,
Mar 1, 2018, 10:05:10 AM3/1/18
to DDD/CQRS
Hello Peter,
Providing a comprehensive answer to your first question is not easy. In short, users may enter product specifications, establish relationships with other companies, share documents, perform inspections, etc... So, there is data entry, but there are also processes which depend on the entered data. To me, events do make sense for the system (eg. when a specification is approved, then change the status, record the user who approved it, and send out notifications) and I have already put together some POCs. I know that not everything is going to be an aggregate. But there are things that do strike me as potential aggregates, so I just want to make sense of it all. You are correct in assuming that UoM is configuration data. However, it is Enterprise-specific configuration data. But, if 2 Enterprises define "Box" as a UoM, I think they would be considered as equal (although I don't imagine 1 Enterprise is going to use another Enterprise's value). So, this is what tells me that it is most likely a value object and raises the previous questions.
Reply all
Reply to author
Forward
0 new messages