booni3
5 months ago
197
1
Laravel

Shared resources in DDD

Posted 5 months ago by booni3

I am experimenting with a DDD architecture. I have a number of defined modules but then they also all have quite strong links via 1 or 2 elements. For example:

project
│
└───Domain
│   │
│   └───Account
│   │
│   └───Delivery
│   │
│   └───Fulfilment
│   

This is a warehouse management system. In the above modules:

  • Product is received into the warehouse on a delivery
  • Product is dispatched as fulfilment

Each of these modules have their own set of tables, own routes, jobs, exceptions etc. and work fairly independently from one another, however there is certain logic that requires a shared resource.

Both the delivery and fulfilment modules interact with product and stock. In DDD, should we use shared/global resources or should each of these be a module that can communicate with another?

At this stage I am trying not to get too detailed in this. My app has got fairly big and I want to be able to split out each core function into its on module, partly for readability but also so I can improve and develop each module in as much isolation as possible from the others.

Its maybe a lot more complicated that I first thought! Any comments would be very welcome!

Please sign in or create an account to participate in this conversation.