SlideShare uma empresa Scribd logo
1 de 79
@mauroservienti | #EDDD
all our
aggregates
are wrong
Mauro Servienti
@mauroservienti
@mauroservienti | #EDDD
All I wanna do
when I wake up in
the morning is…
Rosanna, Toto. Toto IV
@mauroservienti | #EDDD
Buy a "Banana Protector"
@mauroservienti | #EDDD
Buy a "Banana Protector"
@mauroservienti | #EDDD
Sounds like a nice looking aggregate
[ list-of ]
- Item ID
- Price
- Quantity
- Inventory
- Name
- Description
Shopping Cart
@mauroservienti | #EDDD
It even has behaviors
@mauroservienti | #EDDD
please, welcome the
business
@mauroservienti | #EDDD
Business requirements (#1)
@mauroservienti | #EDDD
Straightforward, isn’t it?
[ list-of ]
- Item ID
- Price
- Quantity
- Inventory
- Name
- Description
Shopping Cart
- Item ID
- Price
Sales
@mauroservienti | #EDDD
Straightforward, isn’t it?
[ list-of ]
- Item ID
- Price
- Quantity
- Inventory
- Name
- Description
Shopping Cart
- Item ID
- Price
Sales
copy
@mauroservienti | #EDDD
Business requirements (#2)
@mauroservienti | #EDDD
Still not a big deal…
- Item ID
- Price
Sales
[ list-of ]
- Item ID
- Price
- Quantity
- Inventory
- Name
- Description
Shopping Cart
copy
- Item ID
- Inventory
Warehouse
copy
@mauroservienti | #EDDD
- Item ID
- Price
Sales
[ list-of ]
- Item ID
- Price
- Quantity
- Inventory
- Name
- Description
Shopping Cart
- Item ID
- Inventory
Warehouse
However, availability changes over time
Is item XYZ in a cart?
Update XYZ inventory
Is item XYZ in a cart?
Update XYZ inventory
Is item XYZ in a cart?
Update XYZ inventory
copy
@mauroservienti | #EDDD
Business requirements (#3)
@mauroservienti | #EDDD
- Item ID
- Inventory
Warehouse
…uhm…
Is item XYZ in a cart?
Update XYZ inventory
Is item XYZ in a cart?
Update XYZ inventory
Is item XYZ in a cart?
Update XYZ inventory
- Item ID
- Price
Sales
[ list-of ]
- Item ID
- Price
- Quantity
- Inventory
- Name
- Description
Shopping Cart
@mauroservienti | #EDDD
- Item ID
- Inventory
Warehouse
…uhm…
Is item XYZ in a cart?
Update XYZ inventory
Is item XYZ in a cart?
Update XYZ inventory
Is item XYZ in a cart?
Update XYZ inventory
- Item ID
- Price
Sales
[ list-of ]
- Item ID
- Price
- CurrentPrice
- LastPrice
- Quantity
- Inventory
- Name
- Description
Shopping Cart
@mauroservienti | #EDDD
- Item ID
- Inventory
Warehouse
…uhm…
Is item XYZ in a cart?
Update XYZ inventory
Is item XYZ in a cart?
Update XYZ inventory
Is item XYZ in a cart?
Update XYZ inventory
- Item ID
- Price
Sales
[ list-of ]
- Item ID
- Price
- CurrentPrice
- LastPrice
- Quantity
- Inventory
- Name
- Description
Shopping Cart
Is item XYZ in a cart?
Swap & Insert Prices
@mauroservienti | #EDDD
- Item ID
- Inventory
Warehouse
…uhm…
Is item XYZ in a cart?
Update XYZ inventory
Is item XYZ in a cart?
Update XYZ inventory
Is item XYZ in a cart?
Update XYZ inventory
- Item ID
- Price
Sales
[ list-of ]
- Item ID
- Price
- CurrentPrice
- LastPrice
- Quantity
- Inventory
- Name
- Description
Shopping Cart
Is item XYZ in a cart?
Swap & Insert Prices
Move to Saved for…
@mauroservienti | #EDDD
- Item ID
- Inventory
Warehouse
It’s becoming messy, isn’t it?
- Item ID
- Price
Sales
[ list-of ]
- Item ID
- CurrentPrice
- LastPrice
- Quantity
- Inventory
- Name
- Description
Shopping Cart
Is item XYZ in a cart?
Update XYZ inventory
Is item XYZ in a cart?
Update XYZ inventory
Is item XYZ in a cart?
Update XYZ inventory
Is item XYZ in a cart?
Swap & Insert Prices
Move to Saved for…
Is item XYZ in a cart?
Swap & Insert Prices
Move to Saved for…
@mauroservienti | #EDDD
The big picture is even messier!
[ list-of ]
- Item ID
- CurrentPrice
- LastPrice
- Quantity
- Inventory
- Name
- Description
Shopping Cart
- Item ID
- Inventory
Warehouse
Is item XYZ in a cart?
Update XYZ inventory
- Item ID
- Price
Sales
- Item ID
- Name
- Description
Marketing
copy
Is item XYZ in a cart?
Swap & Insert Prices
Move to Saved for…
@mauroservienti | #EDDD
…and messier!
[ list-of ]
- Item ID
- CurrentPrice
- LastPrice
- Quantity
- Inventory
- Name
- Description
- Estimated
Delivery
Shopping Cart
- Item ID
- Inventory
Warehouse
Is item XYZ in a cart?
Update XYZ inventory
- Item ID
- Price
Sales
Is item XYZ in a cart?
Swap & Insert Prices
- Item ID
- Name
- Description
Marketing
copy
- Item ID
- Delivery
Type
Shipping
Is item XYZ in a cart?
Update XYZ delivery
Move to Saved for…
@mauroservienti | #EDDD
autonomy?
puff, it’s gone
@mauroservienti | #EDDD
Can we get rid of all this coupling?
[ list-of ]
- Item ID
- CurrentPrice
- LastPrice
- Quantity
- Inventory
- Name
- Description
- Estimated
Delivery
Shopping Cart
- Item ID
- Inventory
Warehouse
Is item XYZ in a cart?
Update XYZ inventory
- Item ID
- Price
Sales
- Item ID
- Name
- Description
Marketing
copy
- Item ID
- Delivery
Type
Shipping
Is item XYZ in a cart?
Update XYZ delivery
Is item XYZ in a cart?
Swap & Insert Prices
Move to Saved for…
@mauroservienti | #EDDD
shopping cart
doesn’t exist
@mauroservienti | #EDDD
Sales shopping cart
[ list-of ]
- Item ID
- Quantity
- Inventory
- Name
- Description
- Delivery Est.
Shopping Cart Warehouse
- Item ID
- Price
- Item ID
- Name
- Description
Marketing
- Item ID
- Inventory
Sales
[ list-of ]
- Item ID
- CurrentPrice
- LastPrice
- Quantity
- Item ID
- Delivery
Type
Shipping
@mauroservienti | #EDDD
- Item ID
- Price
- Item ID
- Name
- Description
Marketing
Sales
[ list-of ]
- Item ID
- CurrentPrice
- LastPrice
- Quantity
Warehouse shopping cart
[ list-of ]
- Item ID
- Quantity
- Name
- Description
- Delivery Est.
Shopping Cart
[ list-of ]
- Cart ID
- Item ID
- Inventory
- Quantity
Warehouse
- Item ID
- Inventory
- Item ID
- Delivery
Type
Shipping
@mauroservienti | #EDDD
Shipping shopping cart
[ list-of ]
- Item ID
- Quantity
- Name
- Description
Shopping Cart
[ list-of ]
- Cart ID
- Item ID
- Quantity
- Delivery Est.
- Item ID
- Price
- Item ID
- Name
- Description
Marketing
Sales
[ list-of ]
- Item ID
- CurrentPrice
- LastPrice
- Quantity
[ list-of ]
- Cart ID
- Item ID
- Inventory
- Quantity
Warehouse
- Item ID
- Inventory
- Item ID
- Delivery
Type
Shipping
@mauroservienti | #EDDD
Marketing tends to be stable
[ list-of ]
- Item ID
- Quantity
Shopping Cart
[ list-of ]
- Cart ID
- Item ID
- Quantity
- Delivery Est.
- Item ID
- Price
- Item ID
- Name
- Description
Marketing
Sales
[ list-of ]
- Item ID
- CurrentPrice
- LastPrice
- Quantity
[ list-of ]
- Cart ID
- Item ID
- Inventory
- Quantity
Warehouse
- Item ID
- Inventory
- Item ID
- Delivery
Type
Shipping
@mauroservienti | #EDDD
Do we need the Shopping Cart at all?
[ list-of ]
- Item ID
- Quantity
Shopping Cart
[ list-of ]
- Cart ID
- Item ID
- Quantity
- Delivery Est.
- Item ID
- Price
- Item ID
- Name
- Description
Marketing
Sales
[ list-of ]
- Item ID
- CurrentPrice
- LastPrice
- Quantity
[ list-of ]
- Cart ID
- Item ID
- Inventory
- Quantity
Warehouse
- Item ID
- Inventory
- Item ID
- Delivery
Type
Shipping
@mauroservienti | #EDDD
Can Sales be responsible for that concept?
[ list-of ]
- Cart ID
- Item ID
- Quantity
- Delivery Est.
- Item ID
- Price
- Item ID
- Name
- Description
Marketing
Sales
Cart ID
[ list-of ]
- Item ID
- CurrentPrice
- LastPrice
- Quantity
[ list-of ]
- Cart ID
- Item ID
- Inventory
- Quantity
Warehouse
- Item ID
- Inventory
- Item ID
- Delivery
Type
Shipping
@mauroservienti | #EDDD
We followed the coupling
[ list-of ]
- Cart ID
- Item ID
- Quantity
- Delivery Est.
- Item ID
- Price
- Item ID
- Name
- Description
Marketing
Sales
Cart ID
[ list-of ]
- Item ID
- CurrentPrice
- LastPrice
- Quantity
[ list-of ]
- Cart ID
- Item ID
- Inventory
- Quantity
Warehouse
- Item ID
- Inventory
- Item ID
- Delivery
Type
Shipping
@mauroservienti | #EDDD
information
structure doesn’t fit users
@mauroservienti | #EDDD
Can Read/View Models be a solution?
Marketing Sales Shipping Warehouse others
ViewModel
Storage
Shopping Cart
@mauroservienti | #EDDD
that’s a
cache
@mauroservienti | #EDDD
We cannot cache everything
@mauroservienti | #EDDD
Shared identifiers
[ list-of ]
- Cart ID
- Item ID
- Quantity
- Delivery Est.
- Item ID
- Price
- Item ID
- Name
- Description
Marketing
Sales
Cart ID
[ list-of ]
- Item ID
- CurrentPrice
- LastPrice
- Quantity
[ list-of ]
- Cart ID
- Item ID
- Inventory
- Quantity
Warehouse
- Item ID
- Inventory
- Item ID
- Delivery
Type
Shipping
@mauroservienti | #EDDD
ViewModel Composition
/products/
Browser
1
@mauroservienti | #EDDD
ViewModel Composition
/products/
Marketing Sales Shipping Warehouse others
Browser
IDIDIDIDID
1
ViewModel
@mauroservienti | #EDDD
How can we build such a page?
@mauroservienti | #EDDD
Sales Product Requests Handler
@mauroservienti | #EDDD
Sales Request matching
@mauroservienti | #EDDD
Sales Composition
@mauroservienti | #EDDD
what
about
writes?
@mauroservienti | #EDDD
ViewModel Decomposition
[ list-of ]
- Cart ID
- Item ID
- Quantity
- Delivery Est.
- Item ID
- Price
- Item ID
- Name
- Description
Marketing
Sales
Cart ID
[ list-of ]
- Item ID
- CurrentPrice
- LastPrice
- Quantity
[ list-of ]
- Cart ID
- Item ID
- Inventory
- Quantity
Warehouse
- Item ID
- Inventory
- Item ID
- Delivery
Type
Shipping
@mauroservienti | #EDDD
ViewModel Decomposition
POST -> /shopping-cart/
Browser
{
ItemID
Quantity
}
@mauroservienti | #EDDD
ViewModel Decomposition
POST -> /shopping-cart/
Browser
Sales Shipping Warehouse
ID
Q.ty
ID
Q.ty
ID
Q.ty
{
ItemID
Quantity
}
@mauroservienti | #EDDD
Shipping Shopping Cart Requests Handler
@mauroservienti | #EDDD
Shipping Request Matching
@mauroservienti | #EDDD
Shipping Decomposition
@mauroservienti | #EDDD
things might
go wrong
@mauroservienti | #EDDD
Shipping Decomposition
@mauroservienti | #EDDD
Shipping Shopping Cart Requests Handler
@mauroservienti | #EDDD
Shipping Error Handling
@mauroservienti | #EDDD
Append Only Model
@mauroservienti | #EDDD
there is no such thing as orchestration
@mauroservienti | #EDDD
Full Vertical Slices
MarketingSales Warehouse Shipping
behavior & databehavior & data behavior & databehavior & data
ViewModel Composition ViewModel Composition ViewModel CompositionViewModel Composition
@mauroservienti | #EDDD
services need to
communicate
@mauroservienti | #EDDD
Business requirements (#4)
• Annoy Notify users of 1 week stale carts
• Wipe 1 month stale carts
@mauroservienti | #EDDD
Services communication channel
MarketingSales Warehouse Shipping
behavior & databehavior & data behavior & databehavior & data
ViewModel Composition ViewModel Composition ViewModel CompositionViewModel Composition
@mauroservienti | #EDDD
Services communication channel
MarketingSales Warehouse Shipping
behavior & data
behavior & data
behavior & databehavior & data
ViewModel Composition
ViewModel Composition ViewModel CompositionViewModel Composition
Add Item to Cart
@mauroservienti | #EDDD
Services communication channel
MarketingSales Warehouse Shipping
behavior & data
behavior & data
behavior & databehavior & data
ViewModel Composition
ViewModel Composition ViewModel CompositionViewModel Composition
Add Item to Cart
1. Set 1 week timeout
@mauroservienti | #EDDD
Services communication channel
MarketingSales Warehouse Shipping
behavior & data
behavior & data
behavior & databehavior & data
ViewModel Composition
ViewModel Composition ViewModel CompositionViewModel Composition
Add Item to Cart
1. Set 1 week timeout
2. Set 1 month timeout
@mauroservienti | #EDDD
1 week later
MarketingSales Warehouse Shipping
behavior & data
behavior & data
behavior & databehavior & data
ViewModel Composition
ViewModel Composition ViewModel CompositionViewModel Composition
Add Item to Cart
1. Set 1 week timeout
2. Set 1 month timeout
Cart Got Stale
@mauroservienti | #EDDD
1 week later
MarketingSales Warehouse Shipping
behavior & data
behavior & data
behavior & databehavior & data
ViewModel Composition
ViewModel Composition ViewModel CompositionViewModel Composition
Add Item to Cart
1. Set 1 week timeout
2. Set 1 month timeout
busCart Got Stale
@mauroservienti | #EDDD
1 week later
MarketingSales Warehouse Shipping
behavior & data
behavior & data
behavior & databehavior & data
ViewModel Composition
ViewModel Composition ViewModel CompositionViewModel Composition
Add Item to Cart
1. Set 1 week timeout
2. Set 1 month timeout
bus Cart Got Stale
@mauroservienti | #EDDD
1 week later
MarketingSales Warehouse Shipping
behavior & data
behavior & data behavior & data
behavior & data
ViewModel Composition
ViewModel Composition ViewModel Composition
ViewModel Composition
Add Item to Cart
1. Set 1 week timeout
2. Set 1 month timeout
bus
Notify User
Cart Got Stale
@mauroservienti | #EDDD
1 month later
MarketingSales Warehouse Shipping
behavior & data
behavior & data
behavior & databehavior & data
ViewModel Composition
ViewModel Composition ViewModel CompositionViewModel Composition
Add Item to Cart
1. Set 1 week timeout
2. Set 1 month timeout
bus
Cart Expired
@mauroservienti | #EDDD
busCart Expired
1 month later
MarketingSales Warehouse Shipping
behavior & data
behavior & data
behavior & databehavior & data
ViewModel Composition
ViewModel Composition ViewModel CompositionViewModel Composition
Add Item to Cart
1. Set 1 week timeout
2. Set 1 month timeout
Cart Expired
@mauroservienti | #EDDD
1 month later
MarketingSales Warehouse Shipping
behavior & data
behavior & data
behavior & databehavior & data
ViewModel Composition
ViewModel Composition ViewModel CompositionViewModel Composition
Add Item to Cart
1. Set 1 week timeout
2. Set 1 month timeout
busCart Expired Cart Expired
@mauroservienti | #EDDD
1 month later
MarketingSales Warehouse Shipping
behavior & databehavior & data
behavior & data
behavior & data
ViewModel Composition ViewModel Composition ViewModel Composition
ViewModel Composition
Add Item to Cart
1. Set 1 week timeout
2. Set 1 month timeout
bus
Wipe cart Wipe cart
Cart Expired Cart Expired
@mauroservienti | #EDDD
cross services events
can be as thin as
event name and identifiers
@mauroservienti | #EDDD
bus
The final big picture
MarketingSales Warehouse Shipping
behavior & databehavior & data behavior & databehavior & data
UI Shell
ViewModel Composition ViewModel Composition ViewModel CompositionViewModel Composition
@mauroservienti | #EDDD
the 45’ tyranny
Demos
bit.ly/explore-ddd-demos
Udi Dahan talking about boundaries
go.particular.net/explore-ddd-boundaries
@mauroservienti | #EDDD
Takeaways
• Boundaries are key to success
• Do not bring in more technology to solve non-
technical problems
@mauroservienti | #EDDD
Takeaways
• Boundaries are key to success
• Mental model can badly influence design
• Users/Business analysts tend to think in term
of data presentation
@mauroservienti | #EDDD
Takeaways
• Boundaries are key to success
• Mental model can badly influence design
• Do not name things prematurely
• Premature names stick and drive data
aggregation
@mauroservienti | #EDDD
Takeaways
• Boundaries are key to success
• Mental model can badly influence design
• Do not name things prematurely
• Behaviors define how to aggregate data
• Group data that change together and that influence each
other
• Use anti-requirements techniques to validate data
grouping
• Follow the coupling
@mauroservienti | #EDDD
Takeaways
• Boundaries are key to success
• Mental model can badly influence design
• Do not name things prematurely
• Behaviors define how to aggregate data
• Use ViewModel composition to present data
• No need for complex projections and read
models
@mauroservienti | #EDDD
Thank you!
I’ll be around to answer your
questions the whole day

Mais conteúdo relacionado

Mais procurados

Domain Driven Design(DDD) Presentation
Domain Driven Design(DDD) PresentationDomain Driven Design(DDD) Presentation
Domain Driven Design(DDD) PresentationOğuzhan Soykan
 
[215] Druid로 쉽고 빠르게 데이터 분석하기
[215] Druid로 쉽고 빠르게 데이터 분석하기[215] Druid로 쉽고 빠르게 데이터 분석하기
[215] Druid로 쉽고 빠르게 데이터 분석하기NAVER D2
 
Transforming to Microservices
Transforming to MicroservicesTransforming to Microservices
Transforming to MicroservicesKyle Brown
 
Domain Driven Design Introduction
Domain Driven Design IntroductionDomain Driven Design Introduction
Domain Driven Design Introductionwojtek_s
 
Vertical Slicing Architectures
Vertical Slicing ArchitecturesVertical Slicing Architectures
Vertical Slicing ArchitecturesVictor Rentea
 
A microservice approach for legacy modernisation
A microservice approach for legacy modernisationA microservice approach for legacy modernisation
A microservice approach for legacy modernisationluisw19
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven DesignNader Albert
 
Implementing Microservices by DDD
Implementing Microservices by DDDImplementing Microservices by DDD
Implementing Microservices by DDDAmazon Web Services
 
Brownfield Domain Driven Design
Brownfield Domain Driven DesignBrownfield Domain Driven Design
Brownfield Domain Driven DesignNicolò Pignatelli
 
Grokking Techtalk #37: Software design and refactoring
 Grokking Techtalk #37: Software design and refactoring Grokking Techtalk #37: Software design and refactoring
Grokking Techtalk #37: Software design and refactoringGrokking VN
 
Adopting Domain-Driven Design in your organization
Adopting Domain-Driven Design in your organizationAdopting Domain-Driven Design in your organization
Adopting Domain-Driven Design in your organizationAleix Morgadas
 
Liferay Portal Introduction
Liferay Portal IntroductionLiferay Portal Introduction
Liferay Portal IntroductionNguyen Tung
 
신입 SW 개발자 취업 준비
신입 SW 개발자 취업 준비신입 SW 개발자 취업 준비
신입 SW 개발자 취업 준비인서 박
 
The Art of Discovering Bounded Contexts
The Art of Discovering Bounded ContextsThe Art of Discovering Bounded Contexts
The Art of Discovering Bounded ContextsNick Tune
 
Event Driven Architecture (EDA) Reference Architecture
Event Driven Architecture (EDA) Reference ArchitectureEvent Driven Architecture (EDA) Reference Architecture
Event Driven Architecture (EDA) Reference ArchitectureBob Rhubart
 
Mikrofrontend a Module Federation
Mikrofrontend a Module FederationMikrofrontend a Module Federation
Mikrofrontend a Module FederationThe Software House
 

Mais procurados (20)

Domain Driven Design(DDD) Presentation
Domain Driven Design(DDD) PresentationDomain Driven Design(DDD) Presentation
Domain Driven Design(DDD) Presentation
 
[215] Druid로 쉽고 빠르게 데이터 분석하기
[215] Druid로 쉽고 빠르게 데이터 분석하기[215] Druid로 쉽고 빠르게 데이터 분석하기
[215] Druid로 쉽고 빠르게 데이터 분석하기
 
Scrum + bdd + ddd
Scrum + bdd + dddScrum + bdd + ddd
Scrum + bdd + ddd
 
Transforming to Microservices
Transforming to MicroservicesTransforming to Microservices
Transforming to Microservices
 
Domain Driven Design Introduction
Domain Driven Design IntroductionDomain Driven Design Introduction
Domain Driven Design Introduction
 
Vertical Slicing Architectures
Vertical Slicing ArchitecturesVertical Slicing Architectures
Vertical Slicing Architectures
 
A microservice approach for legacy modernisation
A microservice approach for legacy modernisationA microservice approach for legacy modernisation
A microservice approach for legacy modernisation
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
Implementing Microservices by DDD
Implementing Microservices by DDDImplementing Microservices by DDD
Implementing Microservices by DDD
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
Brownfield Domain Driven Design
Brownfield Domain Driven DesignBrownfield Domain Driven Design
Brownfield Domain Driven Design
 
Grokking Techtalk #37: Software design and refactoring
 Grokking Techtalk #37: Software design and refactoring Grokking Techtalk #37: Software design and refactoring
Grokking Techtalk #37: Software design and refactoring
 
Micro-frontends – is it a new normal?
Micro-frontends – is it a new normal?Micro-frontends – is it a new normal?
Micro-frontends – is it a new normal?
 
Adopting Domain-Driven Design in your organization
Adopting Domain-Driven Design in your organizationAdopting Domain-Driven Design in your organization
Adopting Domain-Driven Design in your organization
 
Liferay Portal Introduction
Liferay Portal IntroductionLiferay Portal Introduction
Liferay Portal Introduction
 
신입 SW 개발자 취업 준비
신입 SW 개발자 취업 준비신입 SW 개발자 취업 준비
신입 SW 개발자 취업 준비
 
The Art of Discovering Bounded Contexts
The Art of Discovering Bounded ContextsThe Art of Discovering Bounded Contexts
The Art of Discovering Bounded Contexts
 
Event Driven Architecture (EDA) Reference Architecture
Event Driven Architecture (EDA) Reference ArchitectureEvent Driven Architecture (EDA) Reference Architecture
Event Driven Architecture (EDA) Reference Architecture
 
Mikrofrontend a Module Federation
Mikrofrontend a Module FederationMikrofrontend a Module Federation
Mikrofrontend a Module Federation
 

Mais de Mauro Servienti

Welcome to the (state) machine @ ExploreDDD 2019
Welcome to the (state) machine @ ExploreDDD 2019Welcome to the (state) machine @ ExploreDDD 2019
Welcome to the (state) machine @ ExploreDDD 2019Mauro Servienti
 
Designing a ui for microservices @ .NET Day Switzerland 2019
Designing a ui for microservices @ .NET Day Switzerland 2019Designing a ui for microservices @ .NET Day Switzerland 2019
Designing a ui for microservices @ .NET Day Switzerland 2019Mauro Servienti
 
Welcome to the (state) machine @ Xe One Day Enterprise Applications
Welcome to the (state) machine @ Xe One Day Enterprise ApplicationsWelcome to the (state) machine @ Xe One Day Enterprise Applications
Welcome to the (state) machine @ Xe One Day Enterprise ApplicationsMauro Servienti
 
All our aggregates are wrong @ NDC Copenhagen 2019
All our aggregates are wrong @ NDC Copenhagen 2019All our aggregates are wrong @ NDC Copenhagen 2019
All our aggregates are wrong @ NDC Copenhagen 2019Mauro Servienti
 
Be like water, my friend @ Agile for Innovation 2019
Be like water, my friend @ Agile for Innovation 2019Be like water, my friend @ Agile for Innovation 2019
Be like water, my friend @ Agile for Innovation 2019Mauro Servienti
 
Microservices architecture is it the right choice to design long-living syste...
Microservices architecture is it the right choice to design long-living syste...Microservices architecture is it the right choice to design long-living syste...
Microservices architecture is it the right choice to design long-living syste...Mauro Servienti
 
Titles, abstracts, and bio matter... oh my! @ Global Diversity CFP Day 2019
Titles, abstracts, and bio matter... oh my! @ Global Diversity CFP Day 2019Titles, abstracts, and bio matter... oh my! @ Global Diversity CFP Day 2019
Titles, abstracts, and bio matter... oh my! @ Global Diversity CFP Day 2019Mauro Servienti
 
Living organizations, particular software @ do IT Better Parma
Living organizations, particular software @ do IT Better ParmaLiving organizations, particular software @ do IT Better Parma
Living organizations, particular software @ do IT Better ParmaMauro Servienti
 
Welcome to the (state) machine @ Crafted Software
Welcome to the (state) machine @ Crafted SoftwareWelcome to the (state) machine @ Crafted Software
Welcome to the (state) machine @ Crafted SoftwareMauro Servienti
 
PO is dead, long live the PO - Italian Agile Day 2018
PO is dead, long live the PO - Italian Agile Day 2018PO is dead, long live the PO - Italian Agile Day 2018
PO is dead, long live the PO - Italian Agile Day 2018Mauro Servienti
 
Design a UI for your Microservices @ Do IT Better
Design a UI for your Microservices @ Do IT BetterDesign a UI for your Microservices @ Do IT Better
Design a UI for your Microservices @ Do IT BetterMauro Servienti
 
Microservices and pineapple on pizza what do they have in common - dos and ...
Microservices and pineapple on pizza   what do they have in common - dos and ...Microservices and pineapple on pizza   what do they have in common - dos and ...
Microservices and pineapple on pizza what do they have in common - dos and ...Mauro Servienti
 
Designing a ui for microservices
Designing a ui for microservicesDesigning a ui for microservices
Designing a ui for microservicesMauro Servienti
 
Po is dead, long live the po
Po is dead, long live the poPo is dead, long live the po
Po is dead, long live the poMauro Servienti
 
Shipping code is not the problem, deciding what to ship it is!
Shipping code is not the problem, deciding what to ship it is!Shipping code is not the problem, deciding what to ship it is!
Shipping code is not the problem, deciding what to ship it is!Mauro Servienti
 
GraphQL - Where are you from? Where are you going?
GraphQL - Where are you from? Where are you going?GraphQL - Where are you from? Where are you going?
GraphQL - Where are you from? Where are you going?Mauro Servienti
 
Dall'idea al deploy un lungo viaggio che passa per git flow e semver
Dall'idea al deploy   un lungo viaggio che passa per git flow e semverDall'idea al deploy   un lungo viaggio che passa per git flow e semver
Dall'idea al deploy un lungo viaggio che passa per git flow e semverMauro Servienti
 
Progettare una UI per i Microservices
Progettare una UI per i MicroservicesProgettare una UI per i Microservices
Progettare una UI per i MicroservicesMauro Servienti
 
The road to a Service Oriented Architecture is paved with messages
The road to a Service Oriented Architecture is paved with messagesThe road to a Service Oriented Architecture is paved with messages
The road to a Service Oriented Architecture is paved with messagesMauro Servienti
 
La via verso SOA è lastricata di messaggi
La via verso SOA è lastricata di messaggiLa via verso SOA è lastricata di messaggi
La via verso SOA è lastricata di messaggiMauro Servienti
 

Mais de Mauro Servienti (20)

Welcome to the (state) machine @ ExploreDDD 2019
Welcome to the (state) machine @ ExploreDDD 2019Welcome to the (state) machine @ ExploreDDD 2019
Welcome to the (state) machine @ ExploreDDD 2019
 
Designing a ui for microservices @ .NET Day Switzerland 2019
Designing a ui for microservices @ .NET Day Switzerland 2019Designing a ui for microservices @ .NET Day Switzerland 2019
Designing a ui for microservices @ .NET Day Switzerland 2019
 
Welcome to the (state) machine @ Xe One Day Enterprise Applications
Welcome to the (state) machine @ Xe One Day Enterprise ApplicationsWelcome to the (state) machine @ Xe One Day Enterprise Applications
Welcome to the (state) machine @ Xe One Day Enterprise Applications
 
All our aggregates are wrong @ NDC Copenhagen 2019
All our aggregates are wrong @ NDC Copenhagen 2019All our aggregates are wrong @ NDC Copenhagen 2019
All our aggregates are wrong @ NDC Copenhagen 2019
 
Be like water, my friend @ Agile for Innovation 2019
Be like water, my friend @ Agile for Innovation 2019Be like water, my friend @ Agile for Innovation 2019
Be like water, my friend @ Agile for Innovation 2019
 
Microservices architecture is it the right choice to design long-living syste...
Microservices architecture is it the right choice to design long-living syste...Microservices architecture is it the right choice to design long-living syste...
Microservices architecture is it the right choice to design long-living syste...
 
Titles, abstracts, and bio matter... oh my! @ Global Diversity CFP Day 2019
Titles, abstracts, and bio matter... oh my! @ Global Diversity CFP Day 2019Titles, abstracts, and bio matter... oh my! @ Global Diversity CFP Day 2019
Titles, abstracts, and bio matter... oh my! @ Global Diversity CFP Day 2019
 
Living organizations, particular software @ do IT Better Parma
Living organizations, particular software @ do IT Better ParmaLiving organizations, particular software @ do IT Better Parma
Living organizations, particular software @ do IT Better Parma
 
Welcome to the (state) machine @ Crafted Software
Welcome to the (state) machine @ Crafted SoftwareWelcome to the (state) machine @ Crafted Software
Welcome to the (state) machine @ Crafted Software
 
PO is dead, long live the PO - Italian Agile Day 2018
PO is dead, long live the PO - Italian Agile Day 2018PO is dead, long live the PO - Italian Agile Day 2018
PO is dead, long live the PO - Italian Agile Day 2018
 
Design a UI for your Microservices @ Do IT Better
Design a UI for your Microservices @ Do IT BetterDesign a UI for your Microservices @ Do IT Better
Design a UI for your Microservices @ Do IT Better
 
Microservices and pineapple on pizza what do they have in common - dos and ...
Microservices and pineapple on pizza   what do they have in common - dos and ...Microservices and pineapple on pizza   what do they have in common - dos and ...
Microservices and pineapple on pizza what do they have in common - dos and ...
 
Designing a ui for microservices
Designing a ui for microservicesDesigning a ui for microservices
Designing a ui for microservices
 
Po is dead, long live the po
Po is dead, long live the poPo is dead, long live the po
Po is dead, long live the po
 
Shipping code is not the problem, deciding what to ship it is!
Shipping code is not the problem, deciding what to ship it is!Shipping code is not the problem, deciding what to ship it is!
Shipping code is not the problem, deciding what to ship it is!
 
GraphQL - Where are you from? Where are you going?
GraphQL - Where are you from? Where are you going?GraphQL - Where are you from? Where are you going?
GraphQL - Where are you from? Where are you going?
 
Dall'idea al deploy un lungo viaggio che passa per git flow e semver
Dall'idea al deploy   un lungo viaggio che passa per git flow e semverDall'idea al deploy   un lungo viaggio che passa per git flow e semver
Dall'idea al deploy un lungo viaggio che passa per git flow e semver
 
Progettare una UI per i Microservices
Progettare una UI per i MicroservicesProgettare una UI per i Microservices
Progettare una UI per i Microservices
 
The road to a Service Oriented Architecture is paved with messages
The road to a Service Oriented Architecture is paved with messagesThe road to a Service Oriented Architecture is paved with messages
The road to a Service Oriented Architecture is paved with messages
 
La via verso SOA è lastricata di messaggi
La via verso SOA è lastricata di messaggiLa via verso SOA è lastricata di messaggi
La via verso SOA è lastricata di messaggi
 

Último

A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
Clustering techniques data mining book ....
Clustering techniques data mining book ....Clustering techniques data mining book ....
Clustering techniques data mining book ....ShaimaaMohamedGalal
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendArshad QA
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 

Último (20)

A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Clustering techniques data mining book ....
Clustering techniques data mining book ....Clustering techniques data mining book ....
Clustering techniques data mining book ....
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and Backend
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 

All our aggregates are wrong (ExploreDDD 2018)

  • 1. @mauroservienti | #EDDD all our aggregates are wrong Mauro Servienti @mauroservienti
  • 2. @mauroservienti | #EDDD All I wanna do when I wake up in the morning is… Rosanna, Toto. Toto IV
  • 3. @mauroservienti | #EDDD Buy a "Banana Protector"
  • 4. @mauroservienti | #EDDD Buy a "Banana Protector"
  • 5. @mauroservienti | #EDDD Sounds like a nice looking aggregate [ list-of ] - Item ID - Price - Quantity - Inventory - Name - Description Shopping Cart
  • 6. @mauroservienti | #EDDD It even has behaviors
  • 7. @mauroservienti | #EDDD please, welcome the business
  • 9. @mauroservienti | #EDDD Straightforward, isn’t it? [ list-of ] - Item ID - Price - Quantity - Inventory - Name - Description Shopping Cart - Item ID - Price Sales
  • 10. @mauroservienti | #EDDD Straightforward, isn’t it? [ list-of ] - Item ID - Price - Quantity - Inventory - Name - Description Shopping Cart - Item ID - Price Sales copy
  • 11. @mauroservienti | #EDDD Business requirements (#2)
  • 12. @mauroservienti | #EDDD Still not a big deal… - Item ID - Price Sales [ list-of ] - Item ID - Price - Quantity - Inventory - Name - Description Shopping Cart copy - Item ID - Inventory Warehouse copy
  • 13. @mauroservienti | #EDDD - Item ID - Price Sales [ list-of ] - Item ID - Price - Quantity - Inventory - Name - Description Shopping Cart - Item ID - Inventory Warehouse However, availability changes over time Is item XYZ in a cart? Update XYZ inventory Is item XYZ in a cart? Update XYZ inventory Is item XYZ in a cart? Update XYZ inventory copy
  • 14. @mauroservienti | #EDDD Business requirements (#3)
  • 15. @mauroservienti | #EDDD - Item ID - Inventory Warehouse …uhm… Is item XYZ in a cart? Update XYZ inventory Is item XYZ in a cart? Update XYZ inventory Is item XYZ in a cart? Update XYZ inventory - Item ID - Price Sales [ list-of ] - Item ID - Price - Quantity - Inventory - Name - Description Shopping Cart
  • 16. @mauroservienti | #EDDD - Item ID - Inventory Warehouse …uhm… Is item XYZ in a cart? Update XYZ inventory Is item XYZ in a cart? Update XYZ inventory Is item XYZ in a cart? Update XYZ inventory - Item ID - Price Sales [ list-of ] - Item ID - Price - CurrentPrice - LastPrice - Quantity - Inventory - Name - Description Shopping Cart
  • 17. @mauroservienti | #EDDD - Item ID - Inventory Warehouse …uhm… Is item XYZ in a cart? Update XYZ inventory Is item XYZ in a cart? Update XYZ inventory Is item XYZ in a cart? Update XYZ inventory - Item ID - Price Sales [ list-of ] - Item ID - Price - CurrentPrice - LastPrice - Quantity - Inventory - Name - Description Shopping Cart Is item XYZ in a cart? Swap & Insert Prices
  • 18. @mauroservienti | #EDDD - Item ID - Inventory Warehouse …uhm… Is item XYZ in a cart? Update XYZ inventory Is item XYZ in a cart? Update XYZ inventory Is item XYZ in a cart? Update XYZ inventory - Item ID - Price Sales [ list-of ] - Item ID - Price - CurrentPrice - LastPrice - Quantity - Inventory - Name - Description Shopping Cart Is item XYZ in a cart? Swap & Insert Prices Move to Saved for…
  • 19. @mauroservienti | #EDDD - Item ID - Inventory Warehouse It’s becoming messy, isn’t it? - Item ID - Price Sales [ list-of ] - Item ID - CurrentPrice - LastPrice - Quantity - Inventory - Name - Description Shopping Cart Is item XYZ in a cart? Update XYZ inventory Is item XYZ in a cart? Update XYZ inventory Is item XYZ in a cart? Update XYZ inventory Is item XYZ in a cart? Swap & Insert Prices Move to Saved for… Is item XYZ in a cart? Swap & Insert Prices Move to Saved for…
  • 20. @mauroservienti | #EDDD The big picture is even messier! [ list-of ] - Item ID - CurrentPrice - LastPrice - Quantity - Inventory - Name - Description Shopping Cart - Item ID - Inventory Warehouse Is item XYZ in a cart? Update XYZ inventory - Item ID - Price Sales - Item ID - Name - Description Marketing copy Is item XYZ in a cart? Swap & Insert Prices Move to Saved for…
  • 21. @mauroservienti | #EDDD …and messier! [ list-of ] - Item ID - CurrentPrice - LastPrice - Quantity - Inventory - Name - Description - Estimated Delivery Shopping Cart - Item ID - Inventory Warehouse Is item XYZ in a cart? Update XYZ inventory - Item ID - Price Sales Is item XYZ in a cart? Swap & Insert Prices - Item ID - Name - Description Marketing copy - Item ID - Delivery Type Shipping Is item XYZ in a cart? Update XYZ delivery Move to Saved for…
  • 23. @mauroservienti | #EDDD Can we get rid of all this coupling? [ list-of ] - Item ID - CurrentPrice - LastPrice - Quantity - Inventory - Name - Description - Estimated Delivery Shopping Cart - Item ID - Inventory Warehouse Is item XYZ in a cart? Update XYZ inventory - Item ID - Price Sales - Item ID - Name - Description Marketing copy - Item ID - Delivery Type Shipping Is item XYZ in a cart? Update XYZ delivery Is item XYZ in a cart? Swap & Insert Prices Move to Saved for…
  • 24. @mauroservienti | #EDDD shopping cart doesn’t exist
  • 25. @mauroservienti | #EDDD Sales shopping cart [ list-of ] - Item ID - Quantity - Inventory - Name - Description - Delivery Est. Shopping Cart Warehouse - Item ID - Price - Item ID - Name - Description Marketing - Item ID - Inventory Sales [ list-of ] - Item ID - CurrentPrice - LastPrice - Quantity - Item ID - Delivery Type Shipping
  • 26. @mauroservienti | #EDDD - Item ID - Price - Item ID - Name - Description Marketing Sales [ list-of ] - Item ID - CurrentPrice - LastPrice - Quantity Warehouse shopping cart [ list-of ] - Item ID - Quantity - Name - Description - Delivery Est. Shopping Cart [ list-of ] - Cart ID - Item ID - Inventory - Quantity Warehouse - Item ID - Inventory - Item ID - Delivery Type Shipping
  • 27. @mauroservienti | #EDDD Shipping shopping cart [ list-of ] - Item ID - Quantity - Name - Description Shopping Cart [ list-of ] - Cart ID - Item ID - Quantity - Delivery Est. - Item ID - Price - Item ID - Name - Description Marketing Sales [ list-of ] - Item ID - CurrentPrice - LastPrice - Quantity [ list-of ] - Cart ID - Item ID - Inventory - Quantity Warehouse - Item ID - Inventory - Item ID - Delivery Type Shipping
  • 28. @mauroservienti | #EDDD Marketing tends to be stable [ list-of ] - Item ID - Quantity Shopping Cart [ list-of ] - Cart ID - Item ID - Quantity - Delivery Est. - Item ID - Price - Item ID - Name - Description Marketing Sales [ list-of ] - Item ID - CurrentPrice - LastPrice - Quantity [ list-of ] - Cart ID - Item ID - Inventory - Quantity Warehouse - Item ID - Inventory - Item ID - Delivery Type Shipping
  • 29. @mauroservienti | #EDDD Do we need the Shopping Cart at all? [ list-of ] - Item ID - Quantity Shopping Cart [ list-of ] - Cart ID - Item ID - Quantity - Delivery Est. - Item ID - Price - Item ID - Name - Description Marketing Sales [ list-of ] - Item ID - CurrentPrice - LastPrice - Quantity [ list-of ] - Cart ID - Item ID - Inventory - Quantity Warehouse - Item ID - Inventory - Item ID - Delivery Type Shipping
  • 30. @mauroservienti | #EDDD Can Sales be responsible for that concept? [ list-of ] - Cart ID - Item ID - Quantity - Delivery Est. - Item ID - Price - Item ID - Name - Description Marketing Sales Cart ID [ list-of ] - Item ID - CurrentPrice - LastPrice - Quantity [ list-of ] - Cart ID - Item ID - Inventory - Quantity Warehouse - Item ID - Inventory - Item ID - Delivery Type Shipping
  • 31. @mauroservienti | #EDDD We followed the coupling [ list-of ] - Cart ID - Item ID - Quantity - Delivery Est. - Item ID - Price - Item ID - Name - Description Marketing Sales Cart ID [ list-of ] - Item ID - CurrentPrice - LastPrice - Quantity [ list-of ] - Cart ID - Item ID - Inventory - Quantity Warehouse - Item ID - Inventory - Item ID - Delivery Type Shipping
  • 33. @mauroservienti | #EDDD Can Read/View Models be a solution? Marketing Sales Shipping Warehouse others ViewModel Storage Shopping Cart
  • 35. @mauroservienti | #EDDD We cannot cache everything
  • 36. @mauroservienti | #EDDD Shared identifiers [ list-of ] - Cart ID - Item ID - Quantity - Delivery Est. - Item ID - Price - Item ID - Name - Description Marketing Sales Cart ID [ list-of ] - Item ID - CurrentPrice - LastPrice - Quantity [ list-of ] - Cart ID - Item ID - Inventory - Quantity Warehouse - Item ID - Inventory - Item ID - Delivery Type Shipping
  • 37. @mauroservienti | #EDDD ViewModel Composition /products/ Browser 1
  • 38. @mauroservienti | #EDDD ViewModel Composition /products/ Marketing Sales Shipping Warehouse others Browser IDIDIDIDID 1 ViewModel
  • 39. @mauroservienti | #EDDD How can we build such a page?
  • 40. @mauroservienti | #EDDD Sales Product Requests Handler
  • 41. @mauroservienti | #EDDD Sales Request matching
  • 44. @mauroservienti | #EDDD ViewModel Decomposition [ list-of ] - Cart ID - Item ID - Quantity - Delivery Est. - Item ID - Price - Item ID - Name - Description Marketing Sales Cart ID [ list-of ] - Item ID - CurrentPrice - LastPrice - Quantity [ list-of ] - Cart ID - Item ID - Inventory - Quantity Warehouse - Item ID - Inventory - Item ID - Delivery Type Shipping
  • 45. @mauroservienti | #EDDD ViewModel Decomposition POST -> /shopping-cart/ Browser { ItemID Quantity }
  • 46. @mauroservienti | #EDDD ViewModel Decomposition POST -> /shopping-cart/ Browser Sales Shipping Warehouse ID Q.ty ID Q.ty ID Q.ty { ItemID Quantity }
  • 47. @mauroservienti | #EDDD Shipping Shopping Cart Requests Handler
  • 52. @mauroservienti | #EDDD Shipping Shopping Cart Requests Handler
  • 55. @mauroservienti | #EDDD there is no such thing as orchestration
  • 56. @mauroservienti | #EDDD Full Vertical Slices MarketingSales Warehouse Shipping behavior & databehavior & data behavior & databehavior & data ViewModel Composition ViewModel Composition ViewModel CompositionViewModel Composition
  • 57. @mauroservienti | #EDDD services need to communicate
  • 58. @mauroservienti | #EDDD Business requirements (#4) • Annoy Notify users of 1 week stale carts • Wipe 1 month stale carts
  • 59. @mauroservienti | #EDDD Services communication channel MarketingSales Warehouse Shipping behavior & databehavior & data behavior & databehavior & data ViewModel Composition ViewModel Composition ViewModel CompositionViewModel Composition
  • 60. @mauroservienti | #EDDD Services communication channel MarketingSales Warehouse Shipping behavior & data behavior & data behavior & databehavior & data ViewModel Composition ViewModel Composition ViewModel CompositionViewModel Composition Add Item to Cart
  • 61. @mauroservienti | #EDDD Services communication channel MarketingSales Warehouse Shipping behavior & data behavior & data behavior & databehavior & data ViewModel Composition ViewModel Composition ViewModel CompositionViewModel Composition Add Item to Cart 1. Set 1 week timeout
  • 62. @mauroservienti | #EDDD Services communication channel MarketingSales Warehouse Shipping behavior & data behavior & data behavior & databehavior & data ViewModel Composition ViewModel Composition ViewModel CompositionViewModel Composition Add Item to Cart 1. Set 1 week timeout 2. Set 1 month timeout
  • 63. @mauroservienti | #EDDD 1 week later MarketingSales Warehouse Shipping behavior & data behavior & data behavior & databehavior & data ViewModel Composition ViewModel Composition ViewModel CompositionViewModel Composition Add Item to Cart 1. Set 1 week timeout 2. Set 1 month timeout Cart Got Stale
  • 64. @mauroservienti | #EDDD 1 week later MarketingSales Warehouse Shipping behavior & data behavior & data behavior & databehavior & data ViewModel Composition ViewModel Composition ViewModel CompositionViewModel Composition Add Item to Cart 1. Set 1 week timeout 2. Set 1 month timeout busCart Got Stale
  • 65. @mauroservienti | #EDDD 1 week later MarketingSales Warehouse Shipping behavior & data behavior & data behavior & databehavior & data ViewModel Composition ViewModel Composition ViewModel CompositionViewModel Composition Add Item to Cart 1. Set 1 week timeout 2. Set 1 month timeout bus Cart Got Stale
  • 66. @mauroservienti | #EDDD 1 week later MarketingSales Warehouse Shipping behavior & data behavior & data behavior & data behavior & data ViewModel Composition ViewModel Composition ViewModel Composition ViewModel Composition Add Item to Cart 1. Set 1 week timeout 2. Set 1 month timeout bus Notify User Cart Got Stale
  • 67. @mauroservienti | #EDDD 1 month later MarketingSales Warehouse Shipping behavior & data behavior & data behavior & databehavior & data ViewModel Composition ViewModel Composition ViewModel CompositionViewModel Composition Add Item to Cart 1. Set 1 week timeout 2. Set 1 month timeout bus Cart Expired
  • 68. @mauroservienti | #EDDD busCart Expired 1 month later MarketingSales Warehouse Shipping behavior & data behavior & data behavior & databehavior & data ViewModel Composition ViewModel Composition ViewModel CompositionViewModel Composition Add Item to Cart 1. Set 1 week timeout 2. Set 1 month timeout Cart Expired
  • 69. @mauroservienti | #EDDD 1 month later MarketingSales Warehouse Shipping behavior & data behavior & data behavior & databehavior & data ViewModel Composition ViewModel Composition ViewModel CompositionViewModel Composition Add Item to Cart 1. Set 1 week timeout 2. Set 1 month timeout busCart Expired Cart Expired
  • 70. @mauroservienti | #EDDD 1 month later MarketingSales Warehouse Shipping behavior & databehavior & data behavior & data behavior & data ViewModel Composition ViewModel Composition ViewModel Composition ViewModel Composition Add Item to Cart 1. Set 1 week timeout 2. Set 1 month timeout bus Wipe cart Wipe cart Cart Expired Cart Expired
  • 71. @mauroservienti | #EDDD cross services events can be as thin as event name and identifiers
  • 72. @mauroservienti | #EDDD bus The final big picture MarketingSales Warehouse Shipping behavior & databehavior & data behavior & databehavior & data UI Shell ViewModel Composition ViewModel Composition ViewModel CompositionViewModel Composition
  • 73. @mauroservienti | #EDDD the 45’ tyranny Demos bit.ly/explore-ddd-demos Udi Dahan talking about boundaries go.particular.net/explore-ddd-boundaries
  • 74. @mauroservienti | #EDDD Takeaways • Boundaries are key to success • Do not bring in more technology to solve non- technical problems
  • 75. @mauroservienti | #EDDD Takeaways • Boundaries are key to success • Mental model can badly influence design • Users/Business analysts tend to think in term of data presentation
  • 76. @mauroservienti | #EDDD Takeaways • Boundaries are key to success • Mental model can badly influence design • Do not name things prematurely • Premature names stick and drive data aggregation
  • 77. @mauroservienti | #EDDD Takeaways • Boundaries are key to success • Mental model can badly influence design • Do not name things prematurely • Behaviors define how to aggregate data • Group data that change together and that influence each other • Use anti-requirements techniques to validate data grouping • Follow the coupling
  • 78. @mauroservienti | #EDDD Takeaways • Boundaries are key to success • Mental model can badly influence design • Do not name things prematurely • Behaviors define how to aggregate data • Use ViewModel composition to present data • No need for complex projections and read models
  • 79. @mauroservienti | #EDDD Thank you! I’ll be around to answer your questions the whole day

Notas do Editor

  1. I’m a remote worker We live in a small flat, thus I have a small office I enjoy going to the office by bike And I enjoy bananas for my breaks Bike riding and bananas in the backpack are not a great idea, so…
  2. How is this thing designed?
  3. I’m a remote worker I enjoy going to work by bike And I enjoy bananas as lunch breaks Bike riding and bananas in the backpack are not a great idea, so…
  4. Price cannot unexpectedly change while an item is in the cart
  5. Price cannot unexpectedly change while an item is in the cart
  6. we could have shipping that kicks in to define shipping policies, and so on.
  7. distributed monolith
  8. Distributed monolith
  9. The least amount of coupling
  10. Sales conceptually own the shopping car concept
  11. Sales conceptually own the shopping car concept
  12. Sales conceptually own the shopping car concept
  13. Sales conceptually own the shopping car concept
  14. Since we have very low, if not zero, coupling across services.