Recognizing Bounded Contexts and Bounded Context Data Models
Because accommodation reservation does not have an outlined, strong enterprise data model, it uses bounded context data models. To recreate this process:
- Identify bounded contexts
- Assign each API to precisely one bounded context, based on the defining (governing) data types for that API Anypoint Platform Architecture Application Network
- The defining data type of the "Single Room Search SAPI" is single room booking
- If an API has no clear set of defining data types, or if those data types are used in significantly different variations in different operations of that API, then the API is likely too coarse-grained and should be broken up
- Designate a bounded context data model for each bounded context, based pragmatically on the needs of the APIs in that bounded context
- Reuse the bounded context data model in the APIs of that bounded context
How to Identify Bounded Contexts
- Begin with the organizational building by directing basic units where important business concepts are used in a coherent and uniform way
- Examples include single room booking, resort booking, party hall booking, lunch or dinner booking, customer relationship management, etc.
- If you have any doubt, favor smaller bounded contexts
- If you are still unsure, put each API in its own bounded context
- Note: It is not recommended to adjust API data models within APIs
A bounded context data model should be published as RAML fragments (RAML types, possibly in a RAML Library) in Anypoint Design Center and Anypoint Exchange so that it can be easily re-used in all APIs in a bounded context.