@@ -42,42 +42,36 @@ DDD Syntax:
4242### Sample
4343
4444``` feakin
45- ContextMap Ticket {
45+ ContextMap Ticket {}
4646
47- }
48-
49- Context ShoppingCarContext {
50-
51- }
47+ Context ShoppingCarContext {}
5248
5349// render wtih UML styled?
5450Aggregate Cart {
55- """ inline doc sample
51+ """ inline doc sample
5652just-demo for test
5753"""
58- display = "Cart";
59- DomainEvent CartCreated, CartItemAdded, CartItemRemoved, CartItemQuantityChanged, CartCheckedOut;
60- DomainEvent CartItemQuantityChanged;
61-
62- // Concept or UML like ?
63- // can be inside or outside of the Aggregate
64- Entity Cart {
65- // it's to many, can change in different way.
66- ValueObject CartId
67- ValueObject CartStatus
68- ValueObject CartItem
69- ValueObject CartItemQuantity
70- ValueObject CartItemPrice
71- ValueObject CartItemTotal
72- ValueObject CartTotal
73- }
74- }
54+ display = "Cart";
55+ DomainEvent CartCreated, CartItemAdded, CartItemRemoved, CartItemQuantityChanged, CartCheckedOut;
56+ DomainEvent CartItemQuantityChanged;
7557
76- // global detail for Cart.
58+ // Concept or UML like ?
59+ // can be inside or outside of the Aggregate
7760Entity Cart {
78-
61+ // it's to many, can change in different way.
62+ ValueObject CartId
63+ ValueObject CartStatus
64+ ValueObject CartItem
65+ ValueObject CartItemQuantity
66+ ValueObject CartItemPrice
67+ ValueObject CartItemTotal
68+ ValueObject CartTotal
69+ }
7970}
8071
72+ // global detail for Cart.
73+ Entity Cart {}
74+
8175DomainLanguage(sourceSet = TicketLang)
8276```
8377
@@ -142,7 +136,12 @@ impl CinemaCreated {
142136 // or
143137 via UserRepository ::save(user: User ) receive user: User ;
144138 // message queue
145- via MessageQueue send " CinemaCreated" to CinemaCreated
139+ via MessageQueue send CinemaCreated to " CinemaCreated"
140+ // http request
141+ via HTTP ::post (with parameter())? to " ${uri} /post"
142+ // grpc Greeter
143+ via GRPC ::Greeter send CinemaCreated to " CinemaCreated"
144+ // map filter
146145 choose(isUserValid) {
147146 is true = > {
148147 // do something
@@ -338,25 +337,25 @@ SourceSet TicketLang {
338337
339338``` feakin
340339layered default {
341- dependency {
342- "interface" -> "application"
343- "interface" -> "domain"
344- "domain" -> "application"
345- "application" -> "infrastructure"
346- "interface" -> "infrastructure"
347- }
348- layer interface {
349- package: "com.example.book"
350- }
351- layer domain {
352- package: "com.example.domain"
353- }
354- layer application {
355- package: "com.example.application"
356- }
357- layer infrastructure {
358- package: "com.example.infrastructure"
359- }
340+ dependency {
341+ "interface" -> "application"
342+ "interface" -> "domain"
343+ "domain" -> "application"
344+ "application" -> "infrastructure"
345+ "interface" -> "infrastructure"
346+ }
347+ layer interface {
348+ package: "com.example.book"
349+ }
350+ layer domain {
351+ package: "com.example.domain"
352+ }
353+ layer application {
354+ package: "com.example.application"
355+ }
356+ layer infrastructure {
357+ package: "com.example.infrastructure"
358+ }
360359}
361360```
362361
@@ -379,15 +378,15 @@ Description Syntax:
379378
380379``` feakin
381380description FakeCode {
382- if (and ?) then {} else { }
383- choose() {
384- condition:
385- condition:
386- }
387- done
388- operator: <, >, >=, <=, ==, +, -, *, %, /, ?
389- // call
390- via Entity send/receive Event;
381+ if (and ?) then {} else {}
382+ choose() {
383+ condition:
384+ condition:
385+ }
386+ done
387+ operator: <, >, >=, <=, ==, +, -, *, %, /, ?
388+ // call
389+ via Entity send/ receive Event;
391390}
392391```
393392
0 commit comments