SlideShare a Scribd company logo
Domain Driven Design 
Through Onion Architecture
Bowling Score Sheet
What is Domain Driven Design 
• A technique for developing software that 
focuses on collaboration between technical 
experts and domain experts. 
• The ideas and terms of the domain should be 
directly reflected by the code through the 
Ubiquitous Language.
Bowling Domain 
• Who are the Domain Experts? 
• What is the Ubiquitous Language?
Bounded Contexts 
• Subdivide large domains into smaller contexts. 
• Each context can have it’s own ubiquitous 
language and it’s own model. 
• Bounded Contexts may share some domain 
aspects.
Bowling Bounded Contexts 
• Scoring 
• Statistics 
• Lane Reservation 
• Sales 
• Maintenance
Traditional Layered Architecture 
Presentation 
Business/Domain 
Data Access
Onion Architecture 
Infrastructure 
API 
Domain 
Core
The Core 
• Building blocks used to create the 
application. 
• Not specific to any domain or technology. 
• Eg. Lists, Maps, Case Classes, Actors, Lenses
The API 
• Acts as an entry point to the Domain 
• Communicates using Domain terms and 
Domain objects 
• Should be restricted to exposing only 
immutable objects 
• Can access the Core and the Domain but not 
the Infrastructure
Bowling API 
• Could include methods like: 
• Create Game 
• Add/Remove Player 
• Get Players 
• Set Pin State 
• Skip Player 
• Set Lane
The Domain 
• Built out of the building blocks defined in the 
Core 
• Uses Ubiquitous Language 
• BUSINESS LOGIC GOES HERE!
Bowling Domain 
• Domain Terms: Game, Player, Pin, Frame, 
Strike, Spare 
• Out of Context: Pinsetter, Customer, Lane 
Reservation 
• Non Domain Terms: User Interface, Database
Domain Building Blocks 
• Value Objects 
• Entities 
• Aggregate Roots 
• Repositories 
• Factories 
• Services
Bowling Aggregate Root 
• Candidates: Player, Game 
• Which Entities are present in most or all API 
operations? 
• Which Entity if deleted would result in the 
deletion of some or all other Entities?
The Infrastructure 
• Contains adapters for various technology 
concerns including Databases, User 
Interfaces, External Services etc. 
• Has access to all areas of the system (API, 
Domain, Core)
Bowling Infrastructure 
• Pinsetter 
• UI for lane screens 
• UI for alley staff 
• Database
Wrap Up 
• How portable is the Bowling Score Keeper? 
• Can it be adapted to other uses with minimal 
effort? 
• Is it tied to the underlying technology?
Domain Driven Design Through Onion Architecture

More Related Content

What's hot (20)

PPTX
Pain Points In API Development? They’re Everywhere
Nordic APIs
 
PPTX
Appcelerator Alloy Deep Dive - tiTokyo 2013
Ricardo Alcocer
 
PDF
API Description Languages
Akana
 
PDF
Scintillating
ESUG
 
PPTX
Introduction To Domain Driven Design
Paul Rayner
 
PDF
The New Way of Developing with AEM 6.0 | Sightly | Beautiful Markup
Senol Tas
 
PPTX
Starting Mobile Development
Pranav Ainavolu
 
PDF
GraphQL 101
Paul Withers
 
PPTX
Adapter Design Pattern
Shahriar Iqbal Chowdhury
 
PPT
Orion Introduction
Tomasz Zarna
 
PPTX
Funky serverless features at aws
Doug Winter
 
PPTX
.NET Fringe 2017 - Challenges of Managing CoreFX repo -- Karel Zikmund
Karel Zikmund
 
PPT
Orion Introduction
Tomasz Zarna
 
PPTX
Rapid With Spring Roo
Morten Lileng
 
PPTX
.NET MeetUp Prague 2017 - Challenges of Managing CoreFX repo -- Karel Zikmund
Karel Zikmund
 
PDF
apidays LIVE Paris 2021 - Learning the Language of HTTP for a Better Data Exp...
apidays
 
PDF
The Developers World
Ronald Northrip
 
PDF
WooCommerce & Apple TV
Marko Heijnen
 
PPTX
Create Salesforce online IDE in 30 minutes
Jitendra Zaa
 
PPTX
.NET MeetUp Prague 2017 - .NET Standard -- Karel Zikmund
Karel Zikmund
 
Pain Points In API Development? They’re Everywhere
Nordic APIs
 
Appcelerator Alloy Deep Dive - tiTokyo 2013
Ricardo Alcocer
 
API Description Languages
Akana
 
Scintillating
ESUG
 
Introduction To Domain Driven Design
Paul Rayner
 
The New Way of Developing with AEM 6.0 | Sightly | Beautiful Markup
Senol Tas
 
Starting Mobile Development
Pranav Ainavolu
 
GraphQL 101
Paul Withers
 
Adapter Design Pattern
Shahriar Iqbal Chowdhury
 
Orion Introduction
Tomasz Zarna
 
Funky serverless features at aws
Doug Winter
 
.NET Fringe 2017 - Challenges of Managing CoreFX repo -- Karel Zikmund
Karel Zikmund
 
Orion Introduction
Tomasz Zarna
 
Rapid With Spring Roo
Morten Lileng
 
.NET MeetUp Prague 2017 - Challenges of Managing CoreFX repo -- Karel Zikmund
Karel Zikmund
 
apidays LIVE Paris 2021 - Learning the Language of HTTP for a Better Data Exp...
apidays
 
The Developers World
Ronald Northrip
 
WooCommerce & Apple TV
Marko Heijnen
 
Create Salesforce online IDE in 30 minutes
Jitendra Zaa
 
.NET MeetUp Prague 2017 - .NET Standard -- Karel Zikmund
Karel Zikmund
 

Viewers also liked (8)

PDF
The Architecture of an API Platform
Johannes Ridderstedt
 
PPTX
Applying Domain-Driven Design to APIs and Microservices - Austin API Meetup
LaunchAny
 
PDF
Domain Driven Design
Nikolay Vasilev
 
PDF
API Design Methodology - Mike Amundsen, Director of API Architecture, API Aca...
CA API Management
 
PDF
Api architectures for the modern enterprise
CA API Management
 
PPTX
Designing APIs and Microservices Using Domain-Driven Design
LaunchAny
 
PPTX
Domain Driven Design using Laravel
wajrcs
 
PDF
Software Design Patterns in Laravel by Phill Sparks
Phill Sparks
 
The Architecture of an API Platform
Johannes Ridderstedt
 
Applying Domain-Driven Design to APIs and Microservices - Austin API Meetup
LaunchAny
 
Domain Driven Design
Nikolay Vasilev
 
API Design Methodology - Mike Amundsen, Director of API Architecture, API Aca...
CA API Management
 
Api architectures for the modern enterprise
CA API Management
 
Designing APIs and Microservices Using Domain-Driven Design
LaunchAny
 
Domain Driven Design using Laravel
wajrcs
 
Software Design Patterns in Laravel by Phill Sparks
Phill Sparks
 
Ad

Similar to Domain Driven Design Through Onion Architecture (20)

PPTX
Domain Driven Design
Hannah Farrugia
 
PPTX
Domain Driven Design
Up2 Technology
 
PDF
apidays London 2023 - Why and how to apply DDD to APIs, Radhouane Jrad, QBE E...
apidays
 
PDF
Domain Driven Design - Building Blocks
Mark Windholtz
 
PPTX
Implementing DDD Concepts in PHP
Steve Rhoades
 
PDF
Domain Driven Design Development Spring Portfolio
Srini Penchikala
 
PPTX
An Introduction to Domain Driven Design in PHP
Chris Renner
 
PDF
From Legacy to DDD in PHP | Tech Talks | Privalia
Jordi Vila Gallardo
 
PPTX
A model driven development framework for developing sense-compute-control app...
Pankesh Patel
 
PDF
Webcast: API-Centric Architecture for Building Context-Aware Apps
Apigee | Google Cloud
 
PPTX
Software Development: Beyond Training wheels
Naveenkumar Muguda
 
PDF
Volume 2-issue-6-2030-2033
Editor IJARCET
 
PDF
Volume 2-issue-6-2030-2033
Editor IJARCET
 
PPTX
Java TechTalk "Spring boot made life easier with Kubernetes and Microservices"
GlobalLogic Ukraine
 
PDF
Introduction to Domain Driven Design
Christos Tsakostas
 
PDF
Cerutti--Web Information Systems (postgrad seminar @ University of Brescia)
Federico Cerutti
 
PDF
Domain driven design and model driven development
Dmitry Geyzersky
 
PPT
Model driven RichUbi: a model driven process for building rich interfaces of ...
Luciana Zaina
 
PPTX
L23 Summary and Conclusions
Ólafur Andri Ragnarsson
 
PDF
I Love APIs 2015: Building Predictive Apps with Lamda and MicroServices
Apigee | Google Cloud
 
Domain Driven Design
Hannah Farrugia
 
Domain Driven Design
Up2 Technology
 
apidays London 2023 - Why and how to apply DDD to APIs, Radhouane Jrad, QBE E...
apidays
 
Domain Driven Design - Building Blocks
Mark Windholtz
 
Implementing DDD Concepts in PHP
Steve Rhoades
 
Domain Driven Design Development Spring Portfolio
Srini Penchikala
 
An Introduction to Domain Driven Design in PHP
Chris Renner
 
From Legacy to DDD in PHP | Tech Talks | Privalia
Jordi Vila Gallardo
 
A model driven development framework for developing sense-compute-control app...
Pankesh Patel
 
Webcast: API-Centric Architecture for Building Context-Aware Apps
Apigee | Google Cloud
 
Software Development: Beyond Training wheels
Naveenkumar Muguda
 
Volume 2-issue-6-2030-2033
Editor IJARCET
 
Volume 2-issue-6-2030-2033
Editor IJARCET
 
Java TechTalk "Spring boot made life easier with Kubernetes and Microservices"
GlobalLogic Ukraine
 
Introduction to Domain Driven Design
Christos Tsakostas
 
Cerutti--Web Information Systems (postgrad seminar @ University of Brescia)
Federico Cerutti
 
Domain driven design and model driven development
Dmitry Geyzersky
 
Model driven RichUbi: a model driven process for building rich interfaces of ...
Luciana Zaina
 
L23 Summary and Conclusions
Ólafur Andri Ragnarsson
 
I Love APIs 2015: Building Predictive Apps with Lamda and MicroServices
Apigee | Google Cloud
 
Ad

More from BoldRadius Solutions (19)

PDF
Introduction to the Typesafe Reactive Platform
BoldRadius Solutions
 
PDF
Partial Functions in Scala
BoldRadius Solutions
 
PDF
Towards Reliable Lookups - Scala By The Bay
BoldRadius Solutions
 
PDF
How You Convince Your Manager To Adopt Scala.js in Production
BoldRadius Solutions
 
PDF
Introduction to the Actor Model
BoldRadius Solutions
 
PDF
Why Not Make the Transition from Java to Scala?
BoldRadius Solutions
 
PDF
String Interpolation in Scala | BoldRadius
BoldRadius Solutions
 
PPTX
Value Classes in Scala | BoldRadius
BoldRadius Solutions
 
PDF
Scala Days Highlights | BoldRadius
BoldRadius Solutions
 
PDF
What Are For Expressions in Scala?
BoldRadius Solutions
 
PDF
Pattern Matching in Scala
BoldRadius Solutions
 
PDF
What are Sealed Classes in Scala?
BoldRadius Solutions
 
PDF
Scala: Collections API
BoldRadius Solutions
 
PDF
How To Use Higher Order Functions in Scala
BoldRadius Solutions
 
PDF
Immutability in Scala
BoldRadius Solutions
 
PDF
Scala Days 2014: Pitching Typesafe
BoldRadius Solutions
 
PDF
Code Brevity in Scala
BoldRadius Solutions
 
PDF
Demonstrating Case Classes in Scala
BoldRadius Solutions
 
PDF
Functional Programming - Worth the Effort
BoldRadius Solutions
 
Introduction to the Typesafe Reactive Platform
BoldRadius Solutions
 
Partial Functions in Scala
BoldRadius Solutions
 
Towards Reliable Lookups - Scala By The Bay
BoldRadius Solutions
 
How You Convince Your Manager To Adopt Scala.js in Production
BoldRadius Solutions
 
Introduction to the Actor Model
BoldRadius Solutions
 
Why Not Make the Transition from Java to Scala?
BoldRadius Solutions
 
String Interpolation in Scala | BoldRadius
BoldRadius Solutions
 
Value Classes in Scala | BoldRadius
BoldRadius Solutions
 
Scala Days Highlights | BoldRadius
BoldRadius Solutions
 
What Are For Expressions in Scala?
BoldRadius Solutions
 
Pattern Matching in Scala
BoldRadius Solutions
 
What are Sealed Classes in Scala?
BoldRadius Solutions
 
Scala: Collections API
BoldRadius Solutions
 
How To Use Higher Order Functions in Scala
BoldRadius Solutions
 
Immutability in Scala
BoldRadius Solutions
 
Scala Days 2014: Pitching Typesafe
BoldRadius Solutions
 
Code Brevity in Scala
BoldRadius Solutions
 
Demonstrating Case Classes in Scala
BoldRadius Solutions
 
Functional Programming - Worth the Effort
BoldRadius Solutions
 

Recently uploaded (20)

PPTX
MailsDaddy Outlook OST to PST converter.pptx
abhishekdutt366
 
PPTX
Comprehensive Guide: Shoviv Exchange to Office 365 Migration Tool 2025
Shoviv Software
 
PPTX
Tally software_Introduction_Presentation
AditiBansal54083
 
PDF
Unlock Efficiency with Insurance Policy Administration Systems
Insurance Tech Services
 
PDF
Thread In Android-Mastering Concurrency for Responsive Apps.pdf
Nabin Dhakal
 
PPTX
MiniTool Power Data Recovery Full Crack Latest 2025
muhammadgurbazkhan
 
PDF
Mobile CMMS Solutions Empowering the Frontline Workforce
CryotosCMMSSoftware
 
PDF
Digger Solo: Semantic search and maps for your local files
seanpedersen96
 
PPTX
Writing Better Code - Helping Developers make Decisions.pptx
Lorraine Steyn
 
PPTX
A Complete Guide to Salesforce SMS Integrations Build Scalable Messaging With...
360 SMS APP
 
PDF
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pdf
Varsha Nayak
 
PPTX
3uTools Full Crack Free Version Download [Latest] 2025
muhammadgurbazkhan
 
PPTX
Revolutionizing Code Modernization with AI
KrzysztofKkol1
 
PPTX
Fundamentals_of_Microservices_Architecture.pptx
MuhammadUzair504018
 
PDF
Revenue streams of the Wazirx clone script.pdf
aaronjeffray
 
PPTX
How Apagen Empowered an EPC Company with Engineering ERP Software
SatishKumar2651
 
PPTX
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pptx
Varsha Nayak
 
PPTX
Human Resources Information System (HRIS)
Amity University, Patna
 
PDF
Build It, Buy It, or Already Got It? Make Smarter Martech Decisions
bbedford2
 
PDF
Streamline Contractor Lifecycle- TECH EHS Solution
TECH EHS Solution
 
MailsDaddy Outlook OST to PST converter.pptx
abhishekdutt366
 
Comprehensive Guide: Shoviv Exchange to Office 365 Migration Tool 2025
Shoviv Software
 
Tally software_Introduction_Presentation
AditiBansal54083
 
Unlock Efficiency with Insurance Policy Administration Systems
Insurance Tech Services
 
Thread In Android-Mastering Concurrency for Responsive Apps.pdf
Nabin Dhakal
 
MiniTool Power Data Recovery Full Crack Latest 2025
muhammadgurbazkhan
 
Mobile CMMS Solutions Empowering the Frontline Workforce
CryotosCMMSSoftware
 
Digger Solo: Semantic search and maps for your local files
seanpedersen96
 
Writing Better Code - Helping Developers make Decisions.pptx
Lorraine Steyn
 
A Complete Guide to Salesforce SMS Integrations Build Scalable Messaging With...
360 SMS APP
 
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pdf
Varsha Nayak
 
3uTools Full Crack Free Version Download [Latest] 2025
muhammadgurbazkhan
 
Revolutionizing Code Modernization with AI
KrzysztofKkol1
 
Fundamentals_of_Microservices_Architecture.pptx
MuhammadUzair504018
 
Revenue streams of the Wazirx clone script.pdf
aaronjeffray
 
How Apagen Empowered an EPC Company with Engineering ERP Software
SatishKumar2651
 
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pptx
Varsha Nayak
 
Human Resources Information System (HRIS)
Amity University, Patna
 
Build It, Buy It, or Already Got It? Make Smarter Martech Decisions
bbedford2
 
Streamline Contractor Lifecycle- TECH EHS Solution
TECH EHS Solution
 

Domain Driven Design Through Onion Architecture

  • 1. Domain Driven Design Through Onion Architecture
  • 3. What is Domain Driven Design • A technique for developing software that focuses on collaboration between technical experts and domain experts. • The ideas and terms of the domain should be directly reflected by the code through the Ubiquitous Language.
  • 4. Bowling Domain • Who are the Domain Experts? • What is the Ubiquitous Language?
  • 5. Bounded Contexts • Subdivide large domains into smaller contexts. • Each context can have it’s own ubiquitous language and it’s own model. • Bounded Contexts may share some domain aspects.
  • 6. Bowling Bounded Contexts • Scoring • Statistics • Lane Reservation • Sales • Maintenance
  • 7. Traditional Layered Architecture Presentation Business/Domain Data Access
  • 9. The Core • Building blocks used to create the application. • Not specific to any domain or technology. • Eg. Lists, Maps, Case Classes, Actors, Lenses
  • 10. The API • Acts as an entry point to the Domain • Communicates using Domain terms and Domain objects • Should be restricted to exposing only immutable objects • Can access the Core and the Domain but not the Infrastructure
  • 11. Bowling API • Could include methods like: • Create Game • Add/Remove Player • Get Players • Set Pin State • Skip Player • Set Lane
  • 12. The Domain • Built out of the building blocks defined in the Core • Uses Ubiquitous Language • BUSINESS LOGIC GOES HERE!
  • 13. Bowling Domain • Domain Terms: Game, Player, Pin, Frame, Strike, Spare • Out of Context: Pinsetter, Customer, Lane Reservation • Non Domain Terms: User Interface, Database
  • 14. Domain Building Blocks • Value Objects • Entities • Aggregate Roots • Repositories • Factories • Services
  • 15. Bowling Aggregate Root • Candidates: Player, Game • Which Entities are present in most or all API operations? • Which Entity if deleted would result in the deletion of some or all other Entities?
  • 16. The Infrastructure • Contains adapters for various technology concerns including Databases, User Interfaces, External Services etc. • Has access to all areas of the system (API, Domain, Core)
  • 17. Bowling Infrastructure • Pinsetter • UI for lane screens • UI for alley staff • Database
  • 18. Wrap Up • How portable is the Bowling Score Keeper? • Can it be adapted to other uses with minimal effort? • Is it tied to the underlying technology?