Map DTO Map DTO Write data Write data Map DTO Write data Write data Send DTO Request DTO Map DTO Request DTO Map DTO Query data Query data Request data Map DTO Query data Query data Request DTO Send update Update screen
AS CCUS , CUST_INTEREST_LOOKUP AS CILO , CUST_INTEREST AS CINT WHERE ( CCUS.CUST_CITY = 'Singapore' AND CCUS.CUST_PROV_STATE = 'Singapore' AND CCUS.CUST_CODE IN ( SELECT COHE.CUST_CODE FROM CUST_ORDER_HEADER AS COHE , CUST_ORDER_STATUS AS COST WHERE ( COHE.CUST_ORDER_DATE >='2009-01-01 00:00:00.001' AND COST.CUST_ORDER_STATUS IN( 'Shipped', 'Back-ordered', 'In-process' ) AND COHE.CUST_ORDER_STATUS_CODE = COST.CUST_ORDER_STATUS_CODE ) ) AND CCUS.CUST_CODE = CINT.CUST_CODE AND CINT.CUST_INTEREST_CODE = CILO.CUST_INTEREST_CODE ) ORDER BY CCUS.CUST_LAST_NAME ASC , CCUS.CUST_FIRST_NAME ASC , CINT.CUST_INTEREST_RANK ASC
coupling (law of demeter) • Causes a state transition • Contains the intend of the user • Exists in a bounded context • Examples: – AddProductToShoppingCart – PurchaseOrder – MoveUserToNewAddress – CorrectAddressForUser – FinalizeOrder
need to be relational • Write are *awesomely* fast! • Rock solid audit log • Read models can (re)build themself of it • The domain uses it to get the current state • Can be used to build any structural model you want!