We are developing a system which is composed of multiple bounded contexts, there are user interfaces where the information displayed needs to be rendered from multiple bounded contexts.
A classic example of such an interface is the Amazon.com ordering page. Where we see about the product (product BC), inventory available (Inventory BC), prices and so on.
My question: in such scenarios, in which bounded context would the user interface live? I get how we can pull data from multiple BC's to form the page, but are there any guidelines as to where the page itself should reside?
Similar questions here and here, they deal with how to get information from the multiple BC's, but they do not address in which BC the user interface itself will live in ?
Any guidelines on that question With an example would be great...
I'm no expert, but I believe the UI does not live in a BC. The UI is an expression of one or more BCs. The BC is a boundary around decisions that are linked. How you surface that to the user is not it's concern.
So for instance you have a web page, such as amazon.com with several BCs as you say, the UI merely guides you along helping you make decisions in whichever BC your are involved with.
One last attempt. If you envision a diagram of either a hexagonal architecture or a layered architecture, you would have at the very outside (top) a UI of some sort. It would communicate with an anti-corruption layer (or application service). This A-C would then delegate to the proper BC to handle the command you wanted fulfilled.
The user interface has its own concerns and collaboration patterns; it is a BC in its own right.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With