SlideShare a Scribd company logo
Into the Domain
Mayank Bairagi
Software Consultant
Knoldus Software
Agenda (Part 1)
➢
Domain Driven Design : An Overview
➢
Domain
➢
Model
➢
Bounded Context
➢
Context Map
➢
Relationship Patterns
➢
Domain Objects
➢
Aggregates
➢
Repository
➢
Domain event
➢
CQRS
Agenda (Part 2)
➢
Domain Specific Language
➢
DSL : Introduction
➢
Anatomy
➢
Composing DSL
➢
Why Scala for DSL
➢
DSL Design in Scala
➢
Best Practice
WHAT IS DOMAIN ?
Domain is a sphere of knowledge, influence and activity
- wikipedia
WHAT IS DOMAIN ?
Domain is a sphere of knowledge, influence and activity
- wikipedia
Domain Driven Design is a methodology for evolving software that closely matches
our business requirement.
WHAT IS DOMAIN ?
Domain is a sphere of knowledge, influence and activity
- wikipedia
Domain Driven Design is a methodology for evolving software that closely matches our
business requirement.
Domain-driven design (DDD) is an approach to developing software for complex needs
by deeply connecting the implementation to an evolving model of the core business
concepts.
How to Identify core domain?
Ask questions
How to Identify core domain?
Ask questions like
➢ What keeps you awake at night
How to Identify core domain?
Ask questions like
➢ What keeps you awake at night.
➢ What makes your system worth writing.
How to Identify core domain?
Ask questions like
➢ What keeps you awake at night.
➢ What makes your system worth writing.
➢ Why not buy it off the self.
How to Identify core domain?
Ask questions like
➢ What keeps you awake at night.
➢ What makes your system worth writing.
➢ Why not buy it off the self.
➢ Why not outsource it.
How to Identify core domain?
Ask questions like
➢ What keeps you awake at night.
➢ What makes your system worth writing.
➢ Why not buy it off the self.
➢ Why not outsource it.
What is Model ?
What is Model ?
Don't think of the model as code.
What is Model ?
Don't think of the model as code.
Models are abstract set of tools used to solve domain problem.
What is Model ?
Don't think of the model as code.
Models are abstract set of tools used to solve problem within a domain.
Don't try to model reality.
Models to solve problem related to temperature
This is not our world
Everything simple is false
Everything which is complex is unusable
- Paul Valery
Ubiquitous Language
In order to search freelancer or project, we will consider inflectional and thesaurus feature of
elasticsearch to make the search more relevant. Additionally we will also exclude the stop words
from the search to make it more accurate.
Ubiquitous Language
In order to search freelancer or project, we will consider inflectional and thesaurus feature of
elasticsearch to make the search more relevant. Additionally we will also exclude the stop words
from the search to make it more accurate.
Ubiquitous Language
In the search functionality we will consider all the synonyms of the search phrase so that it does not
exclude relevant results. Moreover we will not differentiate any search word by its number (singular
or plural), tense, participle etc so that the result becomes more accurate. Additionally as expected in
any search, we will ignore all the noise words that do not have any value in the search. Such noise
words could be “am”, “but”, “where”, “about” etc.
Model(s) may represent
➢ your core domain.
Model(s) may represent
➢
your core domain.
➢
➢
a supporting domain
Model(s) may represent
➢
your core domain.
➢
a supporting domain
➢
a generic subdomain.
Model(s) may represent
➢
your core domain. Focus
➢
a supporting domain Consider outsource
➢
a generic subdomain. Consider off the shelf
Leasing Domain
➢
Identity
➢
Freelancer
➢
Customer
➢
Project
Bounded Context
A domain can have multiple model , each model can be represented by its bounded context.
Delineate applicability of particular module.
Explore model in isolation.
Own code and persistence mechanism.
Context Map
Draw a context map of all the bounded context.
Map what actually exists , not what you wish exsited.
Domain Object
Entity
➢ Must have an identity
➢ Must have a life cycle
➢ Most likely Mutable
➢ May be composed of other entities and value objects.
Value object
➢ No Identity
➢ Defined by its encapsulated attributes
➢ Treat value objects as immutable.
➢ Delegate business logic to value object.
Aggregates
➢
Group of related entities and value objects
➢
Useful when defining transaction, distribution and persistence.
➢
If two things need to be consistent together
Aggregate together
➢
Else
They belongs to separate aggregates.
➢
Within a bounded context there may have multiple aggregates.
Aggregate root
➢
Designate one entity as aggregate root.
➢
Allow external reference to only the aggregate root.
➢
Persist aggregate root along with its object graph.
Services
A place for operations that aren't naturally part of a domain object.
Services should be treated as immutable.
Operations on services are stateless.
What is Domain Event ?
What is Domain Event ?
Something important that happens within the domain that may lead to a stat change is
domain object.
What is Domain Event ?
Something important that happens within the domain that may lead to a stat change is
domain object.
A domain event can lead to another domain event.
eg. 6 balls can trigger an over.
What is Domain Event ?
Something important that happens within the domain that may lead to a stat change is
domain object.
A domain event can lead to another domain event.
eg. 6 balls can trigger an over.
Domain events are immutable.
What is Domain Event ?
Something important that happens within the domain that may lead to a stat change is
domain object.
A domain event can lead to another domain event.
eg. 6 balls can trigger an over.
Domain events are immutable.
Event Log
Domain event should be logged into event log.
Current state can be computed by reading the event log.
If necessary for performance , current state can be cached.
Can also serve as an audit log.
Command Query Responsibility Segregation
(CQRS)
Separate Read/Write model.
Define one model for writing data (command)
Define another model for reading data (query)
Both model operate on same aggregate.
References
➢
Domain Driven Design : Tackling complexity in the heart of software (By Eric Evans).
➢
http://martinfowler.com/tags/domain%20driven%20design.html
➢
http://dddcommunity.org/
➢
https://www.youtube.com/watch?v=RNUn2R7TptM
➢
http://www.slideshare.net/thinkddd
Thank you

More Related Content

What's hot

Tech talk specflow_bddx_hassa_nagy
Tech talk specflow_bddx_hassa_nagyTech talk specflow_bddx_hassa_nagy
Tech talk specflow_bddx_hassa_nagy
Skills Matter
 
Test driving QML
Test driving QMLTest driving QML
Test driving QML
Artem Marchenko
 
Introduction to Bdd and cucumber
Introduction to Bdd and cucumberIntroduction to Bdd and cucumber
Introduction to Bdd and cucumber
Nibu Baby
 
[FullStack NYC 2019] Effective Unit Tests for JavaScript
[FullStack NYC 2019] Effective Unit Tests for JavaScript[FullStack NYC 2019] Effective Unit Tests for JavaScript
[FullStack NYC 2019] Effective Unit Tests for JavaScript
Hazem Saleh
 
Yet Another Continuous Integration Story
Yet Another Continuous Integration StoryYet Another Continuous Integration Story
Yet Another Continuous Integration Story
Anton Serdyuk
 
Unit Testing your React / Redux app (@BucharestJS)
Unit Testing your React / Redux app (@BucharestJS)Unit Testing your React / Redux app (@BucharestJS)
Unit Testing your React / Redux app (@BucharestJS)
Alin Pandichi
 
Trunk-Based Development and Toggling
Trunk-Based Development and TogglingTrunk-Based Development and Toggling
Trunk-Based Development and Toggling
Bryan Liu
 
Rspec and Capybara Intro Tutorial at RailsConf 2013
Rspec and Capybara Intro Tutorial at RailsConf 2013Rspec and Capybara Intro Tutorial at RailsConf 2013
Rspec and Capybara Intro Tutorial at RailsConf 2013
Brian Sam-Bodden
 
Continuous Deployment of Architectural Change
Continuous Deployment of Architectural ChangeContinuous Deployment of Architectural Change
Continuous Deployment of Architectural Change
Matt Graham
 
C# 6
C# 6C# 6
What is this agile thing anyway
What is this agile thing anywayWhat is this agile thing anyway
What is this agile thing anyway
Lisa Van Gelder
 
Tech breakfast at Lab49
Tech breakfast at Lab49Tech breakfast at Lab49
Tech breakfast at Lab49
bankingt702sanskruti
 
TDD For Mortals
TDD For MortalsTDD For Mortals
TDD For Mortals
Kfir Bloch
 
Ntd2015_pt_kanban_ppt
Ntd2015_pt_kanban_pptNtd2015_pt_kanban_ppt
Ntd2015_pt_kanban_ppt
Jokin Aspiazu
 
Test and Behaviour Driven Development (TDD/BDD)
Test and Behaviour Driven Development (TDD/BDD)Test and Behaviour Driven Development (TDD/BDD)
Test and Behaviour Driven Development (TDD/BDD)
Lars Thorup
 
Automating Your Way to Greatness by Combining OutSystems CI/CD With the Power...
Automating Your Way to Greatness by Combining OutSystems CI/CD With the Power...Automating Your Way to Greatness by Combining OutSystems CI/CD With the Power...
Automating Your Way to Greatness by Combining OutSystems CI/CD With the Power...
OutSystems
 
Patterns of a "Good" Test Automation Framework, Locators & Data
Patterns of a "Good" Test Automation Framework, Locators & DataPatterns of a "Good" Test Automation Framework, Locators & Data
Patterns of a "Good" Test Automation Framework, Locators & Data
Agile Testing Alliance
 
QA 4 python
QA 4 pythonQA 4 python
QA 4 python
BeDjango
 
Comparing Agile QA Approaches to End-to-End Testing
Comparing Agile QA Approaches to End-to-End TestingComparing Agile QA Approaches to End-to-End Testing
Comparing Agile QA Approaches to End-to-End Testing
Katie Chin
 
Gherkin model BDD
Gherkin model BDDGherkin model BDD

What's hot (20)

Tech talk specflow_bddx_hassa_nagy
Tech talk specflow_bddx_hassa_nagyTech talk specflow_bddx_hassa_nagy
Tech talk specflow_bddx_hassa_nagy
 
Test driving QML
Test driving QMLTest driving QML
Test driving QML
 
Introduction to Bdd and cucumber
Introduction to Bdd and cucumberIntroduction to Bdd and cucumber
Introduction to Bdd and cucumber
 
[FullStack NYC 2019] Effective Unit Tests for JavaScript
[FullStack NYC 2019] Effective Unit Tests for JavaScript[FullStack NYC 2019] Effective Unit Tests for JavaScript
[FullStack NYC 2019] Effective Unit Tests for JavaScript
 
Yet Another Continuous Integration Story
Yet Another Continuous Integration StoryYet Another Continuous Integration Story
Yet Another Continuous Integration Story
 
Unit Testing your React / Redux app (@BucharestJS)
Unit Testing your React / Redux app (@BucharestJS)Unit Testing your React / Redux app (@BucharestJS)
Unit Testing your React / Redux app (@BucharestJS)
 
Trunk-Based Development and Toggling
Trunk-Based Development and TogglingTrunk-Based Development and Toggling
Trunk-Based Development and Toggling
 
Rspec and Capybara Intro Tutorial at RailsConf 2013
Rspec and Capybara Intro Tutorial at RailsConf 2013Rspec and Capybara Intro Tutorial at RailsConf 2013
Rspec and Capybara Intro Tutorial at RailsConf 2013
 
Continuous Deployment of Architectural Change
Continuous Deployment of Architectural ChangeContinuous Deployment of Architectural Change
Continuous Deployment of Architectural Change
 
C# 6
C# 6C# 6
C# 6
 
What is this agile thing anyway
What is this agile thing anywayWhat is this agile thing anyway
What is this agile thing anyway
 
Tech breakfast at Lab49
Tech breakfast at Lab49Tech breakfast at Lab49
Tech breakfast at Lab49
 
TDD For Mortals
TDD For MortalsTDD For Mortals
TDD For Mortals
 
Ntd2015_pt_kanban_ppt
Ntd2015_pt_kanban_pptNtd2015_pt_kanban_ppt
Ntd2015_pt_kanban_ppt
 
Test and Behaviour Driven Development (TDD/BDD)
Test and Behaviour Driven Development (TDD/BDD)Test and Behaviour Driven Development (TDD/BDD)
Test and Behaviour Driven Development (TDD/BDD)
 
Automating Your Way to Greatness by Combining OutSystems CI/CD With the Power...
Automating Your Way to Greatness by Combining OutSystems CI/CD With the Power...Automating Your Way to Greatness by Combining OutSystems CI/CD With the Power...
Automating Your Way to Greatness by Combining OutSystems CI/CD With the Power...
 
Patterns of a "Good" Test Automation Framework, Locators & Data
Patterns of a "Good" Test Automation Framework, Locators & DataPatterns of a "Good" Test Automation Framework, Locators & Data
Patterns of a "Good" Test Automation Framework, Locators & Data
 
QA 4 python
QA 4 pythonQA 4 python
QA 4 python
 
Comparing Agile QA Approaches to End-to-End Testing
Comparing Agile QA Approaches to End-to-End TestingComparing Agile QA Approaches to End-to-End Testing
Comparing Agile QA Approaches to End-to-End Testing
 
Gherkin model BDD
Gherkin model BDDGherkin model BDD
Gherkin model BDD
 

Similar to Into the domain

Brownfield Domain Driven Design
Brownfield Domain Driven DesignBrownfield Domain Driven Design
Brownfield Domain Driven Design
Nicolò Pignatelli
 
WEBASSEMBLY - What's the right thing to write? -
WEBASSEMBLY - What's the right thing to write? -WEBASSEMBLY - What's the right thing to write? -
WEBASSEMBLY - What's the right thing to write? -
Shin Yoshida
 
All the cool kids....
All the cool kids....All the cool kids....
All the cool kids....
Matthias Noback
 
How to Implement Domain Driven Design in Real Life SDLC
How to Implement Domain Driven Design  in Real Life SDLCHow to Implement Domain Driven Design  in Real Life SDLC
How to Implement Domain Driven Design in Real Life SDLC
Abdul Karim
 
Modelling a complex domain with Domain-Driven Design
Modelling a complex domain with Domain-Driven DesignModelling a complex domain with Domain-Driven Design
Modelling a complex domain with Domain-Driven Design
Naeem Sarfraz
 
Finding balance of DDD while your application grows
Finding balance of DDD while your application growsFinding balance of DDD while your application grows
Finding balance of DDD while your application grows
Carolina Karklis
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
Mattias Andersson
 
DDD In Agile
DDD In Agile   DDD In Agile
DDD In Agile
Skills Matter
 
SAD01 - An Introduction to Systems Analysis and Design
SAD01 - An Introduction to Systems Analysis and DesignSAD01 - An Introduction to Systems Analysis and Design
SAD01 - An Introduction to Systems Analysis and Design
Michael Heron
 
Microservices Architecture
Microservices ArchitectureMicroservices Architecture
Microservices Architecture
Alessandro Giorgetti
 
Codemash 2.0.1.4: Tech Trends and Pwning Your Pwn Career
Codemash 2.0.1.4: Tech Trends and Pwning Your Pwn CareerCodemash 2.0.1.4: Tech Trends and Pwning Your Pwn Career
Codemash 2.0.1.4: Tech Trends and Pwning Your Pwn Career
Kevin Davis
 
50.000 orange stickies later
50.000 orange stickies later50.000 orange stickies later
50.000 orange stickies later
Alberto Brandolini
 
Old Is the New New
Old Is the New NewOld Is the New New
Old Is the New New
Kevlin Henney
 
Worse Is Better, for Better or for Worse
Worse Is Better, for Better or for WorseWorse Is Better, for Better or for Worse
Worse Is Better, for Better or for Worse
Kevlin Henney
 
.NET Architecture for Enterprises
.NET Architecture for Enterprises.NET Architecture for Enterprises
.NET Architecture for Enterprises
Wade Wegner
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
Muhammad Ali
 
How We end the Walking Dead in the Enterprise - Session Sponsored by Versent
How We end the Walking Dead in the Enterprise - Session Sponsored by VersentHow We end the Walking Dead in the Enterprise - Session Sponsored by Versent
How We end the Walking Dead in the Enterprise - Session Sponsored by Versent
Amazon Web Services
 
D2 domain driven-design
D2 domain driven-designD2 domain driven-design
D2 domain driven-design
Arnaud Bouchez
 
Domain-Driven Design
Domain-Driven DesignDomain-Driven Design
Domain-Driven Design
Bradley Holt
 
Let's talk about... Microservices
Let's talk about... MicroservicesLet's talk about... Microservices
Let's talk about... Microservices
Alessandro Giorgetti
 

Similar to Into the domain (20)

Brownfield Domain Driven Design
Brownfield Domain Driven DesignBrownfield Domain Driven Design
Brownfield Domain Driven Design
 
WEBASSEMBLY - What's the right thing to write? -
WEBASSEMBLY - What's the right thing to write? -WEBASSEMBLY - What's the right thing to write? -
WEBASSEMBLY - What's the right thing to write? -
 
All the cool kids....
All the cool kids....All the cool kids....
All the cool kids....
 
How to Implement Domain Driven Design in Real Life SDLC
How to Implement Domain Driven Design  in Real Life SDLCHow to Implement Domain Driven Design  in Real Life SDLC
How to Implement Domain Driven Design in Real Life SDLC
 
Modelling a complex domain with Domain-Driven Design
Modelling a complex domain with Domain-Driven DesignModelling a complex domain with Domain-Driven Design
Modelling a complex domain with Domain-Driven Design
 
Finding balance of DDD while your application grows
Finding balance of DDD while your application growsFinding balance of DDD while your application grows
Finding balance of DDD while your application grows
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
DDD In Agile
DDD In Agile   DDD In Agile
DDD In Agile
 
SAD01 - An Introduction to Systems Analysis and Design
SAD01 - An Introduction to Systems Analysis and DesignSAD01 - An Introduction to Systems Analysis and Design
SAD01 - An Introduction to Systems Analysis and Design
 
Microservices Architecture
Microservices ArchitectureMicroservices Architecture
Microservices Architecture
 
Codemash 2.0.1.4: Tech Trends and Pwning Your Pwn Career
Codemash 2.0.1.4: Tech Trends and Pwning Your Pwn CareerCodemash 2.0.1.4: Tech Trends and Pwning Your Pwn Career
Codemash 2.0.1.4: Tech Trends and Pwning Your Pwn Career
 
50.000 orange stickies later
50.000 orange stickies later50.000 orange stickies later
50.000 orange stickies later
 
Old Is the New New
Old Is the New NewOld Is the New New
Old Is the New New
 
Worse Is Better, for Better or for Worse
Worse Is Better, for Better or for WorseWorse Is Better, for Better or for Worse
Worse Is Better, for Better or for Worse
 
.NET Architecture for Enterprises
.NET Architecture for Enterprises.NET Architecture for Enterprises
.NET Architecture for Enterprises
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
How We end the Walking Dead in the Enterprise - Session Sponsored by Versent
How We end the Walking Dead in the Enterprise - Session Sponsored by VersentHow We end the Walking Dead in the Enterprise - Session Sponsored by Versent
How We end the Walking Dead in the Enterprise - Session Sponsored by Versent
 
D2 domain driven-design
D2 domain driven-designD2 domain driven-design
D2 domain driven-design
 
Domain-Driven Design
Domain-Driven DesignDomain-Driven Design
Domain-Driven Design
 
Let's talk about... Microservices
Let's talk about... MicroservicesLet's talk about... Microservices
Let's talk about... Microservices
 

More from Knoldus Inc.

Terratest - Automation testing of infrastructure
Terratest - Automation testing of infrastructureTerratest - Automation testing of infrastructure
Terratest - Automation testing of infrastructure
Knoldus Inc.
 
Getting Started with Apache Spark (Scala)
Getting Started with Apache Spark (Scala)Getting Started with Apache Spark (Scala)
Getting Started with Apache Spark (Scala)
Knoldus Inc.
 
Secure practices with dot net services.pptx
Secure practices with dot net services.pptxSecure practices with dot net services.pptx
Secure practices with dot net services.pptx
Knoldus Inc.
 
Distributed Cache with dot microservices
Distributed Cache with dot microservicesDistributed Cache with dot microservices
Distributed Cache with dot microservices
Knoldus Inc.
 
Introduction to gRPC Presentation (Java)
Introduction to gRPC Presentation (Java)Introduction to gRPC Presentation (Java)
Introduction to gRPC Presentation (Java)
Knoldus Inc.
 
Using InfluxDB for real-time monitoring in Jmeter
Using InfluxDB for real-time monitoring in JmeterUsing InfluxDB for real-time monitoring in Jmeter
Using InfluxDB for real-time monitoring in Jmeter
Knoldus Inc.
 
Intoduction to KubeVela Presentation (DevOps)
Intoduction to KubeVela Presentation (DevOps)Intoduction to KubeVela Presentation (DevOps)
Intoduction to KubeVela Presentation (DevOps)
Knoldus Inc.
 
Stakeholder Management (Project Management) Presentation
Stakeholder Management (Project Management) PresentationStakeholder Management (Project Management) Presentation
Stakeholder Management (Project Management) Presentation
Knoldus Inc.
 
Introduction To Kaniko (DevOps) Presentation
Introduction To Kaniko (DevOps) PresentationIntroduction To Kaniko (DevOps) Presentation
Introduction To Kaniko (DevOps) Presentation
Knoldus Inc.
 
Efficient Test Environments with Infrastructure as Code (IaC)
Efficient Test Environments with Infrastructure as Code (IaC)Efficient Test Environments with Infrastructure as Code (IaC)
Efficient Test Environments with Infrastructure as Code (IaC)
Knoldus Inc.
 
Exploring Terramate DevOps (Presentation)
Exploring Terramate DevOps (Presentation)Exploring Terramate DevOps (Presentation)
Exploring Terramate DevOps (Presentation)
Knoldus Inc.
 
Clean Code in Test Automation Differentiating Between the Good and the Bad
Clean Code in Test Automation  Differentiating Between the Good and the BadClean Code in Test Automation  Differentiating Between the Good and the Bad
Clean Code in Test Automation Differentiating Between the Good and the Bad
Knoldus Inc.
 
Integrating AI Capabilities in Test Automation
Integrating AI Capabilities in Test AutomationIntegrating AI Capabilities in Test Automation
Integrating AI Capabilities in Test Automation
Knoldus Inc.
 
State Management with NGXS in Angular.pptx
State Management with NGXS in Angular.pptxState Management with NGXS in Angular.pptx
State Management with NGXS in Angular.pptx
Knoldus Inc.
 
Authentication in Svelte using cookies.pptx
Authentication in Svelte using cookies.pptxAuthentication in Svelte using cookies.pptx
Authentication in Svelte using cookies.pptx
Knoldus Inc.
 
OAuth2 Implementation Presentation (Java)
OAuth2 Implementation Presentation (Java)OAuth2 Implementation Presentation (Java)
OAuth2 Implementation Presentation (Java)
Knoldus Inc.
 
Supply chain security with Kubeclarity.pptx
Supply chain security with Kubeclarity.pptxSupply chain security with Kubeclarity.pptx
Supply chain security with Kubeclarity.pptx
Knoldus Inc.
 
Mastering Web Scraping with JSoup Unlocking the Secrets of HTML Parsing
Mastering Web Scraping with JSoup Unlocking the Secrets of HTML ParsingMastering Web Scraping with JSoup Unlocking the Secrets of HTML Parsing
Mastering Web Scraping with JSoup Unlocking the Secrets of HTML Parsing
Knoldus Inc.
 
Akka gRPC Essentials A Hands-On Introduction
Akka gRPC Essentials A Hands-On IntroductionAkka gRPC Essentials A Hands-On Introduction
Akka gRPC Essentials A Hands-On Introduction
Knoldus Inc.
 
Entity Core with Core Microservices.pptx
Entity Core with Core Microservices.pptxEntity Core with Core Microservices.pptx
Entity Core with Core Microservices.pptx
Knoldus Inc.
 

More from Knoldus Inc. (20)

Terratest - Automation testing of infrastructure
Terratest - Automation testing of infrastructureTerratest - Automation testing of infrastructure
Terratest - Automation testing of infrastructure
 
Getting Started with Apache Spark (Scala)
Getting Started with Apache Spark (Scala)Getting Started with Apache Spark (Scala)
Getting Started with Apache Spark (Scala)
 
Secure practices with dot net services.pptx
Secure practices with dot net services.pptxSecure practices with dot net services.pptx
Secure practices with dot net services.pptx
 
Distributed Cache with dot microservices
Distributed Cache with dot microservicesDistributed Cache with dot microservices
Distributed Cache with dot microservices
 
Introduction to gRPC Presentation (Java)
Introduction to gRPC Presentation (Java)Introduction to gRPC Presentation (Java)
Introduction to gRPC Presentation (Java)
 
Using InfluxDB for real-time monitoring in Jmeter
Using InfluxDB for real-time monitoring in JmeterUsing InfluxDB for real-time monitoring in Jmeter
Using InfluxDB for real-time monitoring in Jmeter
 
Intoduction to KubeVela Presentation (DevOps)
Intoduction to KubeVela Presentation (DevOps)Intoduction to KubeVela Presentation (DevOps)
Intoduction to KubeVela Presentation (DevOps)
 
Stakeholder Management (Project Management) Presentation
Stakeholder Management (Project Management) PresentationStakeholder Management (Project Management) Presentation
Stakeholder Management (Project Management) Presentation
 
Introduction To Kaniko (DevOps) Presentation
Introduction To Kaniko (DevOps) PresentationIntroduction To Kaniko (DevOps) Presentation
Introduction To Kaniko (DevOps) Presentation
 
Efficient Test Environments with Infrastructure as Code (IaC)
Efficient Test Environments with Infrastructure as Code (IaC)Efficient Test Environments with Infrastructure as Code (IaC)
Efficient Test Environments with Infrastructure as Code (IaC)
 
Exploring Terramate DevOps (Presentation)
Exploring Terramate DevOps (Presentation)Exploring Terramate DevOps (Presentation)
Exploring Terramate DevOps (Presentation)
 
Clean Code in Test Automation Differentiating Between the Good and the Bad
Clean Code in Test Automation  Differentiating Between the Good and the BadClean Code in Test Automation  Differentiating Between the Good and the Bad
Clean Code in Test Automation Differentiating Between the Good and the Bad
 
Integrating AI Capabilities in Test Automation
Integrating AI Capabilities in Test AutomationIntegrating AI Capabilities in Test Automation
Integrating AI Capabilities in Test Automation
 
State Management with NGXS in Angular.pptx
State Management with NGXS in Angular.pptxState Management with NGXS in Angular.pptx
State Management with NGXS in Angular.pptx
 
Authentication in Svelte using cookies.pptx
Authentication in Svelte using cookies.pptxAuthentication in Svelte using cookies.pptx
Authentication in Svelte using cookies.pptx
 
OAuth2 Implementation Presentation (Java)
OAuth2 Implementation Presentation (Java)OAuth2 Implementation Presentation (Java)
OAuth2 Implementation Presentation (Java)
 
Supply chain security with Kubeclarity.pptx
Supply chain security with Kubeclarity.pptxSupply chain security with Kubeclarity.pptx
Supply chain security with Kubeclarity.pptx
 
Mastering Web Scraping with JSoup Unlocking the Secrets of HTML Parsing
Mastering Web Scraping with JSoup Unlocking the Secrets of HTML ParsingMastering Web Scraping with JSoup Unlocking the Secrets of HTML Parsing
Mastering Web Scraping with JSoup Unlocking the Secrets of HTML Parsing
 
Akka gRPC Essentials A Hands-On Introduction
Akka gRPC Essentials A Hands-On IntroductionAkka gRPC Essentials A Hands-On Introduction
Akka gRPC Essentials A Hands-On Introduction
 
Entity Core with Core Microservices.pptx
Entity Core with Core Microservices.pptxEntity Core with Core Microservices.pptx
Entity Core with Core Microservices.pptx
 

Recently uploaded

Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
MichaelKnudsen27
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
Zilliz
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStrDeep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
saastr
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
saastr
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
kumardaparthi1024
 
A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024
Intelisync
 
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - HiikeSystem Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
Hiike
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
Wouter Lemaire
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
AWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptxAWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptx
HarisZaheer8
 
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
alexjohnson7307
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
akankshawande
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
Hiroshi SHIBATA
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Tatiana Kojar
 

Recently uploaded (20)

Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStrDeep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
 
A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024
 
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - HiikeSystem Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
AWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptxAWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptx
 
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
 

Into the domain

  • 1. Into the Domain Mayank Bairagi Software Consultant Knoldus Software
  • 2. Agenda (Part 1) ➢ Domain Driven Design : An Overview ➢ Domain ➢ Model ➢ Bounded Context ➢ Context Map ➢ Relationship Patterns ➢ Domain Objects ➢ Aggregates ➢ Repository ➢ Domain event ➢ CQRS
  • 3. Agenda (Part 2) ➢ Domain Specific Language ➢ DSL : Introduction ➢ Anatomy ➢ Composing DSL ➢ Why Scala for DSL ➢ DSL Design in Scala ➢ Best Practice
  • 4. WHAT IS DOMAIN ? Domain is a sphere of knowledge, influence and activity - wikipedia
  • 5. WHAT IS DOMAIN ? Domain is a sphere of knowledge, influence and activity - wikipedia Domain Driven Design is a methodology for evolving software that closely matches our business requirement.
  • 6. WHAT IS DOMAIN ? Domain is a sphere of knowledge, influence and activity - wikipedia Domain Driven Design is a methodology for evolving software that closely matches our business requirement. Domain-driven design (DDD) is an approach to developing software for complex needs by deeply connecting the implementation to an evolving model of the core business concepts.
  • 7. How to Identify core domain? Ask questions
  • 8. How to Identify core domain? Ask questions like ➢ What keeps you awake at night
  • 9. How to Identify core domain? Ask questions like ➢ What keeps you awake at night. ➢ What makes your system worth writing.
  • 10. How to Identify core domain? Ask questions like ➢ What keeps you awake at night. ➢ What makes your system worth writing. ➢ Why not buy it off the self.
  • 11. How to Identify core domain? Ask questions like ➢ What keeps you awake at night. ➢ What makes your system worth writing. ➢ Why not buy it off the self. ➢ Why not outsource it.
  • 12. How to Identify core domain? Ask questions like ➢ What keeps you awake at night. ➢ What makes your system worth writing. ➢ Why not buy it off the self. ➢ Why not outsource it.
  • 14. What is Model ? Don't think of the model as code.
  • 15. What is Model ? Don't think of the model as code. Models are abstract set of tools used to solve domain problem.
  • 16. What is Model ? Don't think of the model as code. Models are abstract set of tools used to solve problem within a domain. Don't try to model reality.
  • 17. Models to solve problem related to temperature
  • 18. This is not our world
  • 19. Everything simple is false Everything which is complex is unusable - Paul Valery
  • 20. Ubiquitous Language In order to search freelancer or project, we will consider inflectional and thesaurus feature of elasticsearch to make the search more relevant. Additionally we will also exclude the stop words from the search to make it more accurate.
  • 21. Ubiquitous Language In order to search freelancer or project, we will consider inflectional and thesaurus feature of elasticsearch to make the search more relevant. Additionally we will also exclude the stop words from the search to make it more accurate.
  • 22. Ubiquitous Language In the search functionality we will consider all the synonyms of the search phrase so that it does not exclude relevant results. Moreover we will not differentiate any search word by its number (singular or plural), tense, participle etc so that the result becomes more accurate. Additionally as expected in any search, we will ignore all the noise words that do not have any value in the search. Such noise words could be “am”, “but”, “where”, “about” etc.
  • 23. Model(s) may represent ➢ your core domain.
  • 24. Model(s) may represent ➢ your core domain. ➢ ➢ a supporting domain
  • 25. Model(s) may represent ➢ your core domain. ➢ a supporting domain ➢ a generic subdomain.
  • 26. Model(s) may represent ➢ your core domain. Focus ➢ a supporting domain Consider outsource ➢ a generic subdomain. Consider off the shelf
  • 28. Bounded Context A domain can have multiple model , each model can be represented by its bounded context. Delineate applicability of particular module. Explore model in isolation. Own code and persistence mechanism.
  • 29.
  • 30.
  • 31. Context Map Draw a context map of all the bounded context. Map what actually exists , not what you wish exsited.
  • 32. Domain Object Entity ➢ Must have an identity ➢ Must have a life cycle ➢ Most likely Mutable ➢ May be composed of other entities and value objects. Value object ➢ No Identity ➢ Defined by its encapsulated attributes ➢ Treat value objects as immutable. ➢ Delegate business logic to value object.
  • 33. Aggregates ➢ Group of related entities and value objects ➢ Useful when defining transaction, distribution and persistence. ➢ If two things need to be consistent together Aggregate together ➢ Else They belongs to separate aggregates. ➢ Within a bounded context there may have multiple aggregates.
  • 34. Aggregate root ➢ Designate one entity as aggregate root. ➢ Allow external reference to only the aggregate root. ➢ Persist aggregate root along with its object graph.
  • 35.
  • 36.
  • 37.
  • 38. Services A place for operations that aren't naturally part of a domain object. Services should be treated as immutable. Operations on services are stateless.
  • 39. What is Domain Event ?
  • 40. What is Domain Event ? Something important that happens within the domain that may lead to a stat change is domain object.
  • 41. What is Domain Event ? Something important that happens within the domain that may lead to a stat change is domain object. A domain event can lead to another domain event. eg. 6 balls can trigger an over.
  • 42. What is Domain Event ? Something important that happens within the domain that may lead to a stat change is domain object. A domain event can lead to another domain event. eg. 6 balls can trigger an over. Domain events are immutable.
  • 43. What is Domain Event ? Something important that happens within the domain that may lead to a stat change is domain object. A domain event can lead to another domain event. eg. 6 balls can trigger an over. Domain events are immutable.
  • 44. Event Log Domain event should be logged into event log. Current state can be computed by reading the event log. If necessary for performance , current state can be cached. Can also serve as an audit log.
  • 45. Command Query Responsibility Segregation (CQRS) Separate Read/Write model. Define one model for writing data (command) Define another model for reading data (query) Both model operate on same aggregate.
  • 46.
  • 47.
  • 48. References ➢ Domain Driven Design : Tackling complexity in the heart of software (By Eric Evans). ➢ http://martinfowler.com/tags/domain%20driven%20design.html ➢ http://dddcommunity.org/ ➢ https://www.youtube.com/watch?v=RNUn2R7TptM ➢ http://www.slideshare.net/thinkddd