Message oriented Domain Design

Message oriented domain design using javascript functions as first-class aggregate roots / entities

A domain defined

Below, a concrete example of a chosen domain with mappings to code samples (and a working sample).

Online shopping

The diagram below shows events which can occur as part of an online shopping user journey

Contexts of a cart domain
Diagram of a cart domain

We can see that the first event which takes place in our domain is the "Shopping page requested" event from the "Navigation" bounded context.

Messages for a bounded context

The messages defined by the Navigation context are very simple. There is only one

Try it out

You can run the application here: Shopping