SlideShare a Scribd company logo
1 of 20
Invincible React States with
Domain Driven Design
Prateek
Senior Software Engineer @Porter
The Goal
To create a shared domain model, that enables
good design, hassle free development and clear
communication
Image Courtesy: Domain Modeling Made Functional: Tackle Software Complexity with Domain-Driven Design
What
Are
Domains ?
“Domain is an area knowledge
associated with the problem we
are trying to solve”
- Scott Wlaschin
(author of the book - Domain Modeling Made Functional)
What
Are
Domain Models ?
“Domain Model is the dictionary to the
area knowledge ”
What
is
Domain Driven Design
(DDD) ?
“An approach, where structure and
language of the code talks in terms of
business domain”
DDD & Frontend
Data Flow in Frontend Modules
1. Functionally Oriented Domain Driven
Design.
2. ReasonML is the language of choice.
The Use-Case
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
Generation of Account Stmt for an enterprise business account
**Credit amount consumed is the negative of wallet balance
Account Stmt Wallet
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.
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
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
Questions ?

More Related Content

What's hot

Agile software development and extreme Programming
Agile software development and extreme Programming  Agile software development and extreme Programming
Agile software development and extreme Programming
Fatemeh Karimi
 
Xp exterme-programming-model
Xp exterme-programming-modelXp exterme-programming-model
Xp exterme-programming-model
Ali MasudianPour
 
Extreme programming
Extreme programmingExtreme programming
Extreme programming
aaina_katyal
 
Extreme programming
Extreme programmingExtreme programming
Extreme programming
Mr SMAK
 
Extreme Programming (XP) as A Popular Agile methodology.
Extreme Programming (XP) as A Popular Agile methodology.Extreme Programming (XP) as A Popular Agile methodology.
Extreme Programming (XP) as A Popular Agile methodology.
Ali Shaikh
 

What's hot (20)

Lecture 6 agile software development
Lecture 6   agile software developmentLecture 6   agile software development
Lecture 6 agile software development
 
SDLC Smashup
SDLC SmashupSDLC Smashup
SDLC Smashup
 
Extreme Programming (XP) for Dummies
Extreme Programming (XP) for DummiesExtreme Programming (XP) for Dummies
Extreme Programming (XP) for Dummies
 
extreme programming
extreme programmingextreme programming
extreme programming
 
Extreme Programming
Extreme ProgrammingExtreme Programming
Extreme Programming
 
extreme Programming
extreme Programmingextreme Programming
extreme Programming
 
ABC of Agile (Scrum & Extreme Programming)
ABC of Agile (Scrum & Extreme Programming)ABC of Agile (Scrum & Extreme Programming)
ABC of Agile (Scrum & Extreme Programming)
 
SE chapter 5
SE chapter 5SE chapter 5
SE chapter 5
 
Agile software development and extreme Programming
Agile software development and extreme Programming  Agile software development and extreme Programming
Agile software development and extreme Programming
 
Agile Development | Agile Process Models
Agile Development | Agile Process ModelsAgile Development | Agile Process Models
Agile Development | Agile Process Models
 
Xp exterme-programming-model
Xp exterme-programming-modelXp exterme-programming-model
Xp exterme-programming-model
 
Software Engineering Practice
Software Engineering PracticeSoftware Engineering Practice
Software Engineering Practice
 
Chapter 5 Agile Software development
Chapter 5 Agile Software developmentChapter 5 Agile Software development
Chapter 5 Agile Software development
 
Agile Practices - eXtreme Programming
Agile Practices - eXtreme ProgrammingAgile Practices - eXtreme Programming
Agile Practices - eXtreme Programming
 
Extreme programming
Extreme programmingExtreme programming
Extreme programming
 
Introduction to Extreme Programming
Introduction to Extreme ProgrammingIntroduction to Extreme Programming
Introduction to Extreme Programming
 
Xp(Xtreme Programming) presentation
Xp(Xtreme Programming) presentationXp(Xtreme Programming) presentation
Xp(Xtreme Programming) presentation
 
Extreme programming
Extreme programmingExtreme programming
Extreme programming
 
Agile Software Development - making programming fun again
Agile Software Development - making programming fun againAgile Software Development - making programming fun again
Agile Software Development - making programming fun again
 
Extreme Programming (XP) as A Popular Agile methodology.
Extreme Programming (XP) as A Popular Agile methodology.Extreme Programming (XP) as A Popular Agile methodology.
Extreme Programming (XP) as A Popular Agile methodology.
 

Similar to Invincible React States with Domain Driven Design

Resume_Arindom_Updated
Resume_Arindom_UpdatedResume_Arindom_Updated
Resume_Arindom_Updated
Arindom Biswas
 
Sasikumar Selvaraj CV- Mainframe
Sasikumar Selvaraj CV- MainframeSasikumar Selvaraj CV- Mainframe
Sasikumar Selvaraj CV- Mainframe
sasikumar s
 
Syam Prasad Ramineni_MF_Resume
Syam Prasad Ramineni_MF_ResumeSyam Prasad Ramineni_MF_Resume
Syam Prasad Ramineni_MF_Resume
Syam Ramineni
 
CV_PurnimaBalla_WCS-Consultant_7Yrs
CV_PurnimaBalla_WCS-Consultant_7YrsCV_PurnimaBalla_WCS-Consultant_7Yrs
CV_PurnimaBalla_WCS-Consultant_7Yrs
Purnima Balla
 
Resume_Asha Verma 7.8 Years of exp in Mainframe
Resume_Asha Verma 7.8 Years of exp in MainframeResume_Asha Verma 7.8 Years of exp in Mainframe
Resume_Asha Verma 7.8 Years of exp in Mainframe
Asha Verma
 
Resume_Asha Verma 7.8 Years of exp in Mainframe
Resume_Asha Verma 7.8 Years of exp in MainframeResume_Asha Verma 7.8 Years of exp in Mainframe
Resume_Asha Verma 7.8 Years of exp in Mainframe
Asha Verma
 

Similar to Invincible React States with Domain Driven Design (20)

Resume
ResumeResume
Resume
 
Itvv project ppt
Itvv project pptItvv project ppt
Itvv project ppt
 
Agile, User Stories, Domain Driven Design
Agile, User Stories, Domain Driven DesignAgile, User Stories, Domain Driven Design
Agile, User Stories, Domain Driven Design
 
Resume_Arindom_Updated
Resume_Arindom_UpdatedResume_Arindom_Updated
Resume_Arindom_Updated
 
Vamshi krishna kesetty
Vamshi krishna kesettyVamshi krishna kesetty
Vamshi krishna kesetty
 
SONALI_RATHORE_Resume
SONALI_RATHORE_ResumeSONALI_RATHORE_Resume
SONALI_RATHORE_Resume
 
Resume
ResumeResume
Resume
 
ImthiyazAli_Resume
ImthiyazAli_ResumeImthiyazAli_Resume
ImthiyazAli_Resume
 
new final CV
new final CVnew final CV
new final CV
 
Abhishek jaiswal
Abhishek jaiswalAbhishek jaiswal
Abhishek jaiswal
 
Sasikumar Selvaraj CV- Mainframe
Sasikumar Selvaraj CV- MainframeSasikumar Selvaraj CV- Mainframe
Sasikumar Selvaraj CV- Mainframe
 
Resume lavakush kumar shukla
Resume   lavakush kumar shuklaResume   lavakush kumar shukla
Resume lavakush kumar shukla
 
Siraj_CV
Siraj_CVSiraj_CV
Siraj_CV
 
DDD Belgium Meetup 2017: Events, flows and long running services
DDD Belgium Meetup 2017: Events, flows and long running servicesDDD Belgium Meetup 2017: Events, flows and long running services
DDD Belgium Meetup 2017: Events, flows and long running services
 
Domain Driven Design in an Agile World
Domain Driven Design in an Agile WorldDomain Driven Design in an Agile World
Domain Driven Design in an Agile World
 
Syam Prasad Ramineni_MF_Resume
Syam Prasad Ramineni_MF_ResumeSyam Prasad Ramineni_MF_Resume
Syam Prasad Ramineni_MF_Resume
 
CV_PurnimaBalla_WCS-Consultant_7Yrs
CV_PurnimaBalla_WCS-Consultant_7YrsCV_PurnimaBalla_WCS-Consultant_7Yrs
CV_PurnimaBalla_WCS-Consultant_7Yrs
 
Resume_Asha Verma 7.8 Years of exp in Mainframe
Resume_Asha Verma 7.8 Years of exp in MainframeResume_Asha Verma 7.8 Years of exp in Mainframe
Resume_Asha Verma 7.8 Years of exp in Mainframe
 
Resume_Asha Verma 7.8 Years of exp in Mainframe
Resume_Asha Verma 7.8 Years of exp in MainframeResume_Asha Verma 7.8 Years of exp in Mainframe
Resume_Asha Verma 7.8 Years of exp in Mainframe
 
lukecyriac
lukecyriaclukecyriac
lukecyriac
 

Recently uploaded

"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
mphochane1998
 
Hospital management system project report.pdf
Hospital management system project report.pdfHospital management system project report.pdf
Hospital management system project report.pdf
Kamal Acharya
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ssuser89054b
 
Digital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptxDigital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptx
pritamlangde
 
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
AldoGarca30
 
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
jaanualu31
 
Query optimization and processing for advanced database systems
Query optimization and processing for advanced database systemsQuery optimization and processing for advanced database systems
Query optimization and processing for advanced database systems
meharikiros2
 

Recently uploaded (20)

Path loss model, OKUMURA Model, Hata Model
Path loss model, OKUMURA Model, Hata ModelPath loss model, OKUMURA Model, Hata Model
Path loss model, OKUMURA Model, Hata Model
 
Computer Graphics Introduction To Curves
Computer Graphics Introduction To CurvesComputer Graphics Introduction To Curves
Computer Graphics Introduction To Curves
 
AIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsAIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech students
 
Electromagnetic relays used for power system .pptx
Electromagnetic relays used for power system .pptxElectromagnetic relays used for power system .pptx
Electromagnetic relays used for power system .pptx
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
 
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
 
Hospital management system project report.pdf
Hospital management system project report.pdfHospital management system project report.pdf
Hospital management system project report.pdf
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
Digital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptxDigital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptx
 
UNIT 4 PTRP final Convergence in probability.pptx
UNIT 4 PTRP final Convergence in probability.pptxUNIT 4 PTRP final Convergence in probability.pptx
UNIT 4 PTRP final Convergence in probability.pptx
 
Max. shear stress theory-Maximum Shear Stress Theory ​ Maximum Distortional ...
Max. shear stress theory-Maximum Shear Stress Theory ​  Maximum Distortional ...Max. shear stress theory-Maximum Shear Stress Theory ​  Maximum Distortional ...
Max. shear stress theory-Maximum Shear Stress Theory ​ Maximum Distortional ...
 
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
 
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
 
Online food ordering system project report.pdf
Online food ordering system project report.pdfOnline food ordering system project report.pdf
Online food ordering system project report.pdf
 
Ground Improvement Technique: Earth Reinforcement
Ground Improvement Technique: Earth ReinforcementGround Improvement Technique: Earth Reinforcement
Ground Improvement Technique: Earth Reinforcement
 
Query optimization and processing for advanced database systems
Query optimization and processing for advanced database systemsQuery optimization and processing for advanced database systems
Query optimization and processing for advanced database systems
 
Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)
 
Introduction to Artificial Intelligence ( AI)
Introduction to Artificial Intelligence ( AI)Introduction to Artificial Intelligence ( AI)
Introduction to Artificial Intelligence ( AI)
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS Lambda
 
Augmented Reality (AR) with Augin Software.pptx
Augmented Reality (AR) with Augin Software.pptxAugmented Reality (AR) with Augin Software.pptx
Augmented Reality (AR) with Augin Software.pptx
 

Invincible React States with Domain Driven Design

  • 1. Invincible React States with Domain Driven Design Prateek Senior Software Engineer @Porter
  • 2. The Goal To create a shared domain model, that enables good design, hassle free development and clear communication
  • 3. Image Courtesy: Domain Modeling Made Functional: Tackle Software Complexity with Domain-Driven Design
  • 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)
  • 7. “Domain Model is the dictionary to the area knowledge ”
  • 9. “An approach, where structure and language of the code talks in terms of business domain”
  • 11. Data Flow in Frontend Modules
  • 12. 1. Functionally Oriented Domain Driven Design. 2. ReasonML is the language of choice.
  • 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
  • 15. Generation of Account Stmt for an enterprise business account
  • 16. **Credit amount consumed is the negative of wallet balance Account Stmt Wallet
  • 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

Editor's Notes

  1. 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.
  2. More similarities between frontend and backend
  3. Get data and display it on the view. half the battle is won. coding is easy. design is the challenge
  4. 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