Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

composing multiple bounded contexts in a single user interface,

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...

like image 806
Sudarshan Avatar asked Sep 29 '14 05:09

Sudarshan


2 Answers

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.

like image 87
Raif Avatar answered Oct 23 '22 01:10

Raif


The user interface has its own concerns and collaboration patterns; it is a BC in its own right.

like image 20
Bryan Watts Avatar answered Oct 23 '22 02:10

Bryan Watts