-
-
Notifications
You must be signed in to change notification settings - Fork 81
/
Copy pathDDD-Sample_Alternative-Relationship-Syntax.cml
31 lines (23 loc) · 1.32 KB
/
DDD-Sample_Alternative-Relationship-Syntax.cml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/* The DDD Cargo sample application modeled in CML. Note that we split the application into multiple bounded contexts. */
ContextMap {
contains CargoBookingContext
contains VoyagePlanningContext
contains LocationContext
/* As Evans mentions in his book (Bounded Context chapter): The voyage planning can be seen as
* separated bounded context. However, it still shares code with the booking application (CargoBookingContext).
* Thus, they are in a 'Shared-Kernel' relationship.
*/
CargoBookingContext Shared-Kernel VoyagePlanningContext
/* Note that the splitting of the LocationContext is not mentioned in the original DDD sample of Evans.
* However, locations and the management around them, can somehow be seen as a separated concept which is used by other
* bounded contexts. But this is just an example, since we want to demonstrate our DSL with multiple bounded contexts.
*/
CargoBookingContext Downstream-Upstream [OHS,PL]LocationContext
LocationContext[OHS,PL] Upstream-Downstream VoyagePlanningContext
}
/* The original booking application context */
BoundedContext CargoBookingContext
/* We split the Voyage Planning into a separate bounded context as Evans proposes it in his book. */
BoundedContext VoyagePlanningContext
/* Separate bounded context for managing the locations. */
BoundedContext LocationContext