- Add a “IPad Pro” to a Cart
- Add a “Hero ink Pen” to a Cart
- Add 2 quantities of “GM Cricket bat” to Cart.
- Remove already added Item “IPad Pro”( all quantities) from cart.
- As a business User I would like to know which Products (name) were deleted from Cart.
- As a business User, I would like to differentiate between two Carts.
- See the Price of Product before adding to a Cart
- As a Business User I will like price my product 10% below competitor price (competitor price is available for product).
- Create Order (with Products) when Cart is checked out. Also Mark cart as checked out
- Customer and Bank Account - When Customer’s Address is updated, update her all Bank Accounts address as well. (example of invariant or business rules or consistency rules)
- Calculate Total amount for the Order. put shipping cost as per weight
- Total cost = cost of all products in order + (weightIngrams of each product * .01)
-
Learn how to treat the cart as an aggregate object
-
Domain Event
- Use to capture something important
- Immutable and capture something that has happened
- always in past tense
- Can only be raised by the domain layer
-
Don't do additional thing outside of business requirements
-
Domain is a first class citizen
- High cohesion and low coupling
-
Creation of class as business reprensentation
-
Try to use the same language that the business uses
- more like a verb or business process