SlideShare a Scribd company logo
Context Oriented Architecture
Put the boundary in the right place
May 13th-14th 2016 β€” Verona, Italy
Leonardo Proietti
@_leopro_
github.com/leopro
β€œAny intelligent fool can make things
bigger, more complex and more violent.
It takes a touch of genius - and a lot of
courage - to move in the opposite
direction.”
Ernst Friedrich Schumacher
DDD is a learning path
DDD is a
learning path!
Take care of your Ubiquitous Language
You need domain experts ...
… and right devs, UX, designers.
Context oriented architecture - Put the boundary in the right place
Prototype
Getfeedback
Keep going
Continuous negotiation
Just because you can
doesn't mean you should.
Context Matters
Model
User Context
Customer
Context
Investor
Context
Borrower
Context
User
User Context Customer Context
- Register
- Login
- Verification
- Store card
- Charge card
- Apply as customer
User
User Context Customer Context
- Register
- Login
- Verification
- Store card
- Charge card
- Apply as customer
Identity
Behaviours, not only data
Our architecture
Context oriented architecture - Put the boundary in the right place
API
Client
Domain Model
Controller
Command Bus
Persistence
HTTPClient
QueueClient
Domain Model
Controller
Command Bus
Persistence
HTTPClient
QueueClient
User
Context
Customer
Context
API CALL
User
Context
Customer
Context
User
Context
QUEUE
Worker
(Node.js)
Customer
Context
Context oriented architecture - Put the boundary in the right place
Context oriented architecture - Put the boundary in the right place
Context oriented architecture - Put the boundary in the right place
Context oriented architecture - Put the boundary in the right place
Behavioural entities AKA rich modeling
Context oriented architecture - Put the boundary in the right place
Context oriented architecture - Put the boundary in the right place
Unit Testing
Context oriented architecture - Put the boundary in the right place
Context oriented architecture - Put the boundary in the right place
Context oriented architecture - Put the boundary in the right place
Context oriented architecture - Put the boundary in the right place
Context oriented architecture - Put the boundary in the right place
Context oriented architecture - Put the boundary in the right place
Context oriented architecture - Put the boundary in the right place
Context oriented architecture - Put the boundary in the right place
Mitigate the locking
Quick Invest
Command
Handler
Model
Worker
(Node)
API
Persistence
API
Client
Invest Command
Handler
Model
Queue
Context oriented architecture - Put the boundary in the right place
Third party service integration
Command
Handler
Model
API
Client
Worker third partyQueue
Domain
Events
Command
Handler
Model
API
Client
Worker third partyQueue
Domain
Events
Worker third partyQueue
Worker third partyQueue
Functional Testing
Context oriented architecture - Put the boundary in the right place
Customer
Context
Investor
Context
Request
Response
Context oriented architecture - Put the boundary in the right place
Customer
Context
Investor
Context
Request
Response
HTTP Client
Stub
Pitfalls
Value Object (Doctrine embeddable)
Value Object (Doctrine embeddable)
All the fields related to the Address in the user
table must be nullable and you have to validate
them in the model
Referential integrity
Referential integrity
Because each service has his on db, you
should find another way to enforce the
referential integrity
Transactional consistency
Transactional consistency
We are violating the transactional consistency
because we’re using the UOW to persist both
Investor and Loan
β€œAt the end of the day we are
selling shoes.”
@cirpo
Credits
Thank you.
Questions?
https://joind.
in/talk/47383

More Related Content

PPTX
Implementing DDD Concepts in PHP
PPTX
An Introduction to Domain Driven Design in PHP
PDF
Refactoring for Domain Driven Design
PPTX
EF6 and DDD
PDF
Clean architecture with ddd layering in php
PPTX
Domain Driven Design Quickly
KEY
ZendCon 2011 UnCon Domain-Driven Design
PDF
Using ADO.NET Entity Framework in Domain Driven Design: A Pattern Approach
Implementing DDD Concepts in PHP
An Introduction to Domain Driven Design in PHP
Refactoring for Domain Driven Design
EF6 and DDD
Clean architecture with ddd layering in php
Domain Driven Design Quickly
ZendCon 2011 UnCon Domain-Driven Design
Using ADO.NET Entity Framework in Domain Driven Design: A Pattern Approach

What's hot (20)

PDF
Modelling a complex domain with Domain-Driven Design
PDF
Domain-Driven Design with ASP.NET MVC
PPTX
Domain-Driven Design: The "What" and the "Why"
PPTX
A Practical Guide to Domain Driven Design: Presentation Slides
PDF
Domain Driven Design
PPT
Domain Driven Design Demonstrated
PDF
Elements of DDD withΒ ASP.NET MVC &Β Entity Framework Code First
PPT
Dev381.Pp
PDF
Domain Driven Design
PPTX
Domain driven design
PPTX
Domain Driven Design
PPTX
Introduction to DDD
PPTX
Domain Driven Design
PDF
2019-Nov: Domain Driven Design (DDD) and when not to use it
PDF
Domain Driven Design Communication Techniques
PDF
Introduction to-ddd
PPTX
Domain driven design
PPTX
Implementing DDD with C#
PPTX
how_does_ddd_work
PPTX
Domain Driven Design(DDD) Presentation
Modelling a complex domain with Domain-Driven Design
Domain-Driven Design with ASP.NET MVC
Domain-Driven Design: The "What" and the "Why"
A Practical Guide to Domain Driven Design: Presentation Slides
Domain Driven Design
Domain Driven Design Demonstrated
Elements of DDD withΒ ASP.NET MVC &Β Entity Framework Code First
Dev381.Pp
Domain Driven Design
Domain driven design
Domain Driven Design
Introduction to DDD
Domain Driven Design
2019-Nov: Domain Driven Design (DDD) and when not to use it
Domain Driven Design Communication Techniques
Introduction to-ddd
Domain driven design
Implementing DDD with C#
how_does_ddd_work
Domain Driven Design(DDD) Presentation
Ad

Viewers also liked (20)

PPTX
ARCHITECTURAL STUDY: Site Context & Planning
PPT
Fellmann11e ch10
PDF
Beyond Findability: Context
PPT
THE ROLE OF CULTURE IN THE STRUCTURE OF CATEGORIES OF APPLICATION BETWEEN DEN...
PPT
Designing Smart Home Technology for Fall Prevention in Older People
PPT
Cultural differences in the structure of categories among users of wedding pi...
PPTX
Research Seminar
PPT
Area and its boundary
PPT
Fellmann11e ch12
PPT
Shape Features
PDF
CONTEXTUAL ARCHITECTURE: An Indian Perspective
PPTX
DCC2014 - Conversation and Critique within the Architectural Design Process: ...
PDF
Review of network diagram
PPT
Architectural styles
PPTX
HISTORY: Philippines, and Architecture, into the 21st Century Context (PART 2)
PPTX
Architectural styles power point
PDF
Aligning Your Organization's Strategic Direction, Roadmaps, and Technology, A...
PDF
Network Architecture Review Checklist
PPS
Complexity & Contradiction in Architecture
PDF
ARCHITECTURAL STYLE-THEORY OF ARCH -II
ARCHITECTURAL STUDY: Site Context & Planning
Fellmann11e ch10
Beyond Findability: Context
THE ROLE OF CULTURE IN THE STRUCTURE OF CATEGORIES OF APPLICATION BETWEEN DEN...
Designing Smart Home Technology for Fall Prevention in Older People
Cultural differences in the structure of categories among users of wedding pi...
Research Seminar
Area and its boundary
Fellmann11e ch12
Shape Features
CONTEXTUAL ARCHITECTURE: An Indian Perspective
DCC2014 - Conversation and Critique within the Architectural Design Process: ...
Review of network diagram
Architectural styles
HISTORY: Philippines, and Architecture, into the 21st Century Context (PART 2)
Architectural styles power point
Aligning Your Organization's Strategic Direction, Roadmaps, and Technology, A...
Network Architecture Review Checklist
Complexity & Contradiction in Architecture
ARCHITECTURAL STYLE-THEORY OF ARCH -II
Ad

Similar to Context oriented architecture - Put the boundary in the right place (20)

PDF
Domain driven design: a gentle introduction
PPTX
How to organize the business layer in software
PPTX
Using Boundary-Driven Development to beat code complexity
PDF
All the cool kids....
PDF
Application architecture
PPTX
Pragmatic Architecture in .NET
PDF
Beyond MVC: from Model to Domain
PPTX
Refreshing Domain Driven Design
PDF
Advanced Application Architecture Symfony Live Berlin 2018
PDF
Beyond MVC: from Model to Domain
PDF
Aligning Bounded Contexts with Subdomains in Legacy Code - NDC Oslo 2021
PPTX
Practical soa for business and researchers
PDF
APIdays Singapore 2019 - Maturity model for Microservices: Untangling a Big B...
PPTX
Let's talk about... Microservices
PDF
Idiomatic Domain Driven Design: implementing CQRS
PDF
Onion (clean) architecture
PPTX
Practical domain driven design
PPTX
Closing keynote by Jamie Allen
PDF
Layers, ports and adapters
PPTX
Domain Driven Design - garajco Education 2017
Domain driven design: a gentle introduction
How to organize the business layer in software
Using Boundary-Driven Development to beat code complexity
All the cool kids....
Application architecture
Pragmatic Architecture in .NET
Beyond MVC: from Model to Domain
Refreshing Domain Driven Design
Advanced Application Architecture Symfony Live Berlin 2018
Beyond MVC: from Model to Domain
Aligning Bounded Contexts with Subdomains in Legacy Code - NDC Oslo 2021
Practical soa for business and researchers
APIdays Singapore 2019 - Maturity model for Microservices: Untangling a Big B...
Let's talk about... Microservices
Idiomatic Domain Driven Design: implementing CQRS
Onion (clean) architecture
Practical domain driven design
Closing keynote by Jamie Allen
Layers, ports and adapters
Domain Driven Design - garajco Education 2017

Recently uploaded (20)

PPT
isotopes_sddsadsaadasdasdasdasdsa1213.ppt
PDF
Sims 4 Historia para lo sims 4 para jugar
PDF
πŸ’° π”πŠπ“πˆ πŠπ„πŒπ„ππ€ππ†π€π πŠπˆππ„π‘πŸ’πƒ π‡π€π‘πˆ 𝐈𝐍𝐈 πŸπŸŽπŸπŸ“ πŸ’°
Β 
PPTX
Introuction about WHO-FIC in ICD-10.pptx
PPTX
E -tech empowerment technologies PowerPoint
PDF
Cloud-Scale Log Monitoring _ Datadog.pdf
PPTX
artificial intelligence overview of it and more
PPTX
Module 1 - Cyber Law and Ethics 101.pptx
PDF
The Internet -By the Numbers, Sri Lanka Edition
Β 
PPTX
Digital Literacy And Online Safety on internet
PDF
The New Creative Director: How AI Tools for Social Media Content Creation Are...
PPTX
international classification of diseases ICD-10 review PPT.pptx
PPTX
Job_Card_System_Styled_lorem_ipsum_.pptx
PPTX
Introuction about ICD -10 and ICD-11 PPT.pptx
PDF
Decoding a Decade: 10 Years of Applied CTI Discipline
PPTX
Internet___Basics___Styled_ presentation
PPTX
Introduction about ICD -10 and ICD11 on 5.8.25.pptx
PDF
SASE Traffic Flow - ZTNA Connector-1.pdf
PPTX
Slides PPTX World Game (s) Eco Economic Epochs.pptx
PPTX
Funds Management Learning Material for Beg
isotopes_sddsadsaadasdasdasdasdsa1213.ppt
Sims 4 Historia para lo sims 4 para jugar
πŸ’° π”πŠπ“πˆ πŠπ„πŒπ„ππ€ππ†π€π πŠπˆππ„π‘πŸ’πƒ π‡π€π‘πˆ 𝐈𝐍𝐈 πŸπŸŽπŸπŸ“ πŸ’°
Β 
Introuction about WHO-FIC in ICD-10.pptx
E -tech empowerment technologies PowerPoint
Cloud-Scale Log Monitoring _ Datadog.pdf
artificial intelligence overview of it and more
Module 1 - Cyber Law and Ethics 101.pptx
The Internet -By the Numbers, Sri Lanka Edition
Β 
Digital Literacy And Online Safety on internet
The New Creative Director: How AI Tools for Social Media Content Creation Are...
international classification of diseases ICD-10 review PPT.pptx
Job_Card_System_Styled_lorem_ipsum_.pptx
Introuction about ICD -10 and ICD-11 PPT.pptx
Decoding a Decade: 10 Years of Applied CTI Discipline
Internet___Basics___Styled_ presentation
Introduction about ICD -10 and ICD11 on 5.8.25.pptx
SASE Traffic Flow - ZTNA Connector-1.pdf
Slides PPTX World Game (s) Eco Economic Epochs.pptx
Funds Management Learning Material for Beg

Context oriented architecture - Put the boundary in the right place