The presentation for the talk on the use of Domain-Driven Design for creating react states that speak the language of the business.
This talk was a part of React Day Bangalore.
5. “Domain is an area knowledge
associated with the problem we
are trying to solve”
- Scott Wlaschin
(author of the book - Domain Modeling Made Functional)
14. Every Account Statement has a
a Business account And a wallet
And a Statement-Id and a Cycle
Summary.
Every Business account, has a
name And brand name
A Wallet can be of two types :Cash
Or Credit
A cash account has a wallet
balance
A credit account has a wallet-
balance And a credit limit And a
credit amount consumed. Credit
amount consumed is the negative
of wallet balance
A Cycle Summary has a Cycle Duration And
a list of Orders
And a list of Transactions And a date-of-
generation
A Transactions can be of two types: debit Or
credit.
Account Stmt is generated at the end of the
Cycle Duration and sent to the customer. The
Cycle has a duration of 7 days.
Every cycle, multiple orders (trips/bookings)
can be placed from a business account
account statement should not be sent, if no
cycle orders are present.
Generation of Account Stmt for an enterprise business account
17. Account Cycle Summary
Every cycle, multiple orders
(trips/bookings) can be placed from a
business account
Every cycle, multiple transactions
happen in form of payments and
recharges
Account Stmt is generated at the end
of the Cycle Duration and sent to the
customer. The Cycle has a duration of
7 days.
Account statement should not be
sent, if no cycle orders are present.
18. Why DDD ?
everyone
talks in
one
language
Better
product ownership
from developers
documentation
is in the
code
API integrations are
frictionless
Cost
of change is minimized
19. Grateful to ….
The Book: Domain Modeling Made Functional by Scott Wlaschin
Blush and unDraw for helping me with the awesome images
The wonderful folks who created and support ReasonML
The amazing team
@Porter without whom this the talk wouldn’t be possible
We can survive but not thrive. Spot business is my domain and order is my domain model. Example of Order Entity independent of the way it persists in the database.
More similarities between frontend and backend
Get data and display it on the view. half the battle is won. coding is easy. design is the challenge
What I am doing, Why I am doing it instead of how it is done. Why is is good for me and whether it will be helpful to you. The use-case you are trying to solve, and how you can make your use-cases resonate with mine