SlideShare una empresa de Scribd logo
1 de 66
Strategischer Anwendungsentwurf mit


     Domain-Driven Design

                presented by Dennis Traub
                     .NET Usergroup Zentralschweiz - 18. März 2013




Dennis Traub – Software Development Consultancy             @dtraub – mail@dennistraub.de
Now, who‘s that guy?

          Dennis Traub
          Founder, Owner, CEO, Single Employee of
          D. Traub Software Development Consultancy




             Consultant, developer, trainer, speaker


             39 years old


             Married, father of one


             20+ years in software development


             Hire me at mail@dennistraub.de




               @dtraub




Dennis Traub – Software Development Consultancy        @dtraub – mail@dennistraub.de
AGENDA


The Blue Book                                  An Example               Break     Tactical Patterns
   Actually it should                           Bounded Contexts                          A short review of
     be two books!                               and Subdomains                          the Building Blocks


         1                      2                     3                   4                    5                     6
                        Terminology                                  Lasagna                                        End
                         of Strategic Design                       … the new Spaghetti                         Questions & Answers




Dennis Traub – Software Development Consultancy                                                @dtraub – mail@dennistraub.de
AGENDA


The Blue Book                                  An Example                         Tactical Patterns
   Actually it should                           Bounded Contexts                          A short review of
     be two books!                               and Subdomains                          the Building Blocks


         1                      2                     3                   4                    5                     6
                        Terminology                                  Lasagna                                        End
                         of Strategic Design                       … the new Spaghetti                         Questions & Answers




Dennis Traub – Software Development Consultancy                                                @dtraub – mail@dennistraub.de
The „Blue Book“ by Eric Evans




                                          Image Placeholder




Dennis Traub – Software Development Consultancy               @dtraub – mail@dennistraub.de
The „Blue Book“ by Eric Evans


                                              •   Entities
                                              •   Value Objects
                       Tactical               •   Aggregates
                        Class                 •   Repositories
                       Design                 •   Services
                                              •   Factories
                                              •   etc.



          It should be two books!
                                              •   Model Integrity
                                              •   Large-Scale Structure
                                              •   Bounded Contexts
                      Strategic               •   Core Domain
                        DDD                   •   Context Maps
                                              •   Ubiquitous Language
                                              •   etc.




Dennis Traub – Software Development Consultancy                           @dtraub – mail@dennistraub.de
AGENDA


The Blue Book                                  An Example                         Tactical Patterns
   Actually it should                           Bounded Contexts                          A short review of
     be two books!                               and Subdomains                          the Building Blocks


         1                      2                     3                   4                    5                     6
                        Terminology                                  Lasagna                                        End
                         of Strategic Design                       … the new Spaghetti                         Questions & Answers




Dennis Traub – Software Development Consultancy                                                @dtraub – mail@dennistraub.de
Domain




Dennis Traub – Software Development Consultancy   @dtraub – mail@dennistraub.de
Domain




                                            a sphere of
               knowledge, influence, or activity




Dennis Traub – Software Development Consultancy           @dtraub – mail@dennistraub.de
Domain




                            what an organization does
                            and the world it does it in




Dennis Traub – Software Development Consultancy       @dtraub – mail@dennistraub.de
Domain Model




Dennis Traub – Software Development Consultancy   @dtraub – mail@dennistraub.de
Domain Model




               a system of abstractions that describes
                          selected aspects of a domain




Dennis Traub – Software Development Consultancy     @dtraub – mail@dennistraub.de
Domain Model




                     can be used to solve problems
                             related to that domain




Dennis Traub – Software Development Consultancy   @dtraub – mail@dennistraub.de
don‘t model reality




Dennis Traub – Software Development Consultancy           @dtraub – mail@dennistraub.de
we model useful                       abstractions of reality




Dennis Traub – Software Development Consultancy                 @dtraub – mail@dennistraub.de
Ubiquitous Language




Dennis Traub – Software Development Consultancy   @dtraub – mail@dennistraub.de
Ubiquitous Language




                        a language structured around
                                   the domain model




Dennis Traub – Software Development Consultancy       @dtraub – mail@dennistraub.de
Ubiquitous Language




                        used by all          team members




Dennis Traub – Software Development Consultancy        @dtraub – mail@dennistraub.de
Bounded Context




Dennis Traub – Software Development Consultancy   @dtraub – mail@dennistraub.de
Bounded Context




                         an explicit boundary within which
                            a domain              model exists




Dennis Traub – Software Development Consultancy              @dtraub – mail@dennistraub.de
Bounded Context




                                    inside the boundary
                all terms have specific meaning




Dennis Traub – Software Development Consultancy           @dtraub – mail@dennistraub.de
Bounded Context




                       these terms are part of the context‘s
                           ubiquitous language




Dennis Traub – Software Development Consultancy         @dtraub – mail@dennistraub.de
Subdomains




Dennis Traub – Software Development Consultancy   @dtraub – mail@dennistraub.de
Subdomains




                   the whole domain of the organization
                   is comprised                   of subdomains




Dennis Traub – Software Development Consultancy            @dtraub – mail@dennistraub.de
Subdomains




                                they focus on only one
           specific area of the whole business domain




Dennis Traub – Software Development Consultancy          @dtraub – mail@dennistraub.de
Core Domain




Dennis Traub – Software Development Consultancy   @dtraub – mail@dennistraub.de
Core Domain




                    the distinctive        part of the model,
                           central to the users‘ goals




Dennis Traub – Software Development Consultancy        @dtraub – mail@dennistraub.de
Core Domain




                          differentiates the application and
                               makes it valuable




Dennis Traub – Software Development Consultancy          @dtraub – mail@dennistraub.de
Core Domain




                    the most             important subdomain




Dennis Traub – Software Development Consultancy         @dtraub – mail@dennistraub.de
AGENDA


The Blue Book                                  An Example                         Tactical Patterns
   Actually it should                           Bounded Contexts                          A short review of
     be two books!                               and Subdomains                          the Building Blocks


         1                      2                     3                   4                    5                     6
                        Terminology                                  Lasagna                                        End
                         of Strategic Design                       … the new Spaghetti                         Questions & Answers




Dennis Traub – Software Development Consultancy                                                @dtraub – mail@dennistraub.de
Our Domain:




Dennis Traub – Software Development Consultancy   @dtraub – mail@dennistraub.de
Aviation




Dennis Traub – Software Development Consultancy    @dtraub – mail@dennistraub.de
Our Application:




Dennis Traub – Software Development Consultancy   @dtraub – mail@dennistraub.de
Ambulance Flight Management




Dennis Traub – Software Development Consultancy   @dtraub – mail@dennistraub.de
Ambulance Flight Management
                             order flights from an operator
                                   dispatch patients
                                 assign medical staff




Dennis Traub – Software Development Consultancy           @dtraub – mail@dennistraub.de
Bounded Contexts



             1    Patiententransport-Disposition


             2    Flugplanung und -durchführung


             3    Personaleinsatzplanung (Flugärzte, Rettungsassistenten)


             4    Patientendaten, Abrechnung, Buchhaltung


             5    SOAP- oder REST-Services, Web-Oberfläche




Dennis Traub – Software Development Consultancy                 @dtraub – mail@dennistraub.de
Subdomains



             1    Ambulanzflug-Disposition        6   Bodentransport

             2    Flotten-Management              7   Abrechnung, Buchhaltung

             3    Flugplanung                     8   Anwendungsoberfläche

             4    Passagier-/Patientendaten       9   SOAP-/REST-Schnittstelle

             5    Medizinisches Personal          10 Benutzer- und Zugriffssteuerung




Dennis Traub – Software Development Consultancy                  @dtraub – mail@dennistraub.de
don‘t build a model that
                                works for everyone




Dennis Traub – Software Development Consultancy            @dtraub – mail@dennistraub.de
to focus our effort and resources we ask
                  two questions for each subdomain




Dennis Traub – Software Development Consultancy       @dtraub – mail@dennistraub.de
1
                                  how complex is it?




Dennis Traub – Software Development Consultancy        @dtraub – mail@dennistraub.de
2
                 what‘s the value to our specific problem?
                          (if we model it ourselves)




Dennis Traub – Software Development Consultancy       @dtraub – mail@dennistraub.de
1. Complexity (S/M/H)



             1    Ambulanzflug-Disposition        6   Bodentransport

             2    Flotten-Management              7   Abrechnung, Buchhaltung

             3    Flugplanung                     8   Anwendungsoberfläche

             4    Passagier-/Patientendaten       9   SOAP-/REST-Schnittstelle

             5    Medizinisches Personal          10 Benutzer- und Zugriffssteuerung




Dennis Traub – Software Development Consultancy                  @dtraub – mail@dennistraub.de
2. Value (S/M/H)



             1    Ambulanzflug-Disposition        6   Bodentransport

             2    Flotten-Management              7   Abrechnung, Buchhaltung

             3    Flugplanung                     8   Anwendungsoberfläche

             4    Passagier-/Patientendaten       9   SOAP-/REST-Schnittstelle

             5    Medizinisches Personal          10 Benutzer- und Zugriffssteuerung




Dennis Traub – Software Development Consultancy                  @dtraub – mail@dennistraub.de
the tactical Building Blocks
                                    we don‘t use DDD
                             when there is no     value in
                             formalizing the problem




Dennis Traub – Software Development Consultancy           @dtraub – mail@dennistraub.de
we only use DDD in parts
                            where we get a competitive
                                        advantage




Dennis Traub – Software Development Consultancy     @dtraub – mail@dennistraub.de
15 minutes




                                             BREAK




Dennis Traub – Software Development Consultancy                   @dtraub – mail@dennistraub.de
AGENDA


The Blue Book                                  An Example                         Tactical Patterns
   Actually it should                           Bounded Contexts                          A short review of
     be two books!                               and Subdomains                          the Building Blocks


         1                      2                     3                   4                    5                     6
                        Terminology                                  Lasagna                                        End
                         of Strategic Design                       … the new Spaghetti                         Questions & Answers




Dennis Traub – Software Development Consultancy                                                @dtraub – mail@dennistraub.de
Presentation Layer
                 Common Services




                                                                          Infrastructure
                                        Application Services


                                   Domain / Business Model / BLL


                                         DAL / O/R-Mapper




Dennis Traub – Software Development Consultancy                @dtraub – mail@dennistraub.de
Ports & Adapters
             Hexagonal Architecture
               Onion Architecture



Dennis Traub – Software Development Consultancy   @dtraub – mail@dennistraub.de
Dependency Inversion Principle (just in case)




                                     the D in SOLID




Dennis Traub – Software Development Consultancy                                        @dtraub – mail@dennistraub.de
AGENDA


The Blue Book                                  An Example                         Tactical Patterns
   Actually it should                           Bounded Contexts                          A short review of
     be two books!                               and Subdomains                          the Building Blocks


         1                      2                     3                   4                    5                     6
                        Terminology                                  Lasagna                                        End
                         of Strategic Design                       … the new Spaghetti                         Questions & Answers




Dennis Traub – Software Development Consultancy                                                @dtraub – mail@dennistraub.de
Entity




Dennis Traub – Software Development Consultancy      @dtraub – mail@dennistraub.de
Entity




                                              an object
                     primarily defined by its identity




Dennis Traub – Software Development Consultancy           @dtraub – mail@dennistraub.de
Entity




                              has a life
                                  cycle that can
                   radically change its form and content




Dennis Traub – Software Development Consultancy   @dtraub – mail@dennistraub.de
Value Object




Dennis Traub – Software Development Consultancy   @dtraub – mail@dennistraub.de
Value Object




                               an object that represents a
                  descriptive aspect of the domain




Dennis Traub – Software Development Consultancy              @dtraub – mail@dennistraub.de
Value Object




                            doesn‘t have a distinct identity
                               treated as immutable




Dennis Traub – Software Development Consultancy            @dtraub – mail@dennistraub.de
Aggregate




Dennis Traub – Software Development Consultancy   @dtraub – mail@dennistraub.de
Aggregate




                         a cluster of associated objects




Dennis Traub – Software Development Consultancy      @dtraub – mail@dennistraub.de
Aggregate




                                      treated as a unit
                     for the purpose of data        changes




Dennis Traub – Software Development Consultancy           @dtraub – mail@dennistraub.de
Aggregate




                  a set of consistency rules applies
                      within the aggregate‘s boundaries




Dennis Traub – Software Development Consultancy   @dtraub – mail@dennistraub.de
Aggregate




                           enforces its own invariants and
                        is always                 in a valid state




Dennis Traub – Software Development Consultancy                @dtraub – mail@dennistraub.de
AGENDA


The Blue Book                                  An Example                         Tactical Patterns
   Actually it should                           Bounded Contexts                          A short review of
     be two books!                               and Subdomains                          the Building Blocks


         1                      2                     3                   4                    5                     6
                        Terminology                                  Lasagna                                        End
                         of Strategic Design                       … the new Spaghetti                         Questions & Answers




Dennis Traub – Software Development Consultancy                                                @dtraub – mail@dennistraub.de
To summarize: DDD is basically the application
         of the SOLID            principles of object-orientation
                            on an architectural level




Dennis Traub – Software Development Consultancy       @dtraub – mail@dennistraub.de
?

                                        QUESTIONS



Dennis Traub – Software Development Consultancy       @dtraub – mail@dennistraub.de
THANK YOU!
                                         follow me: @dtraub




Dennis Traub – Software Development Consultancy               @dtraub – mail@dennistraub.de

Más contenido relacionado

Similar a Strategischer Anwendungsentwurf mit Domain-Driven Design

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 SDLCAbdul Karim
 
Up to speed in domain driven design
Up to speed in domain driven designUp to speed in domain driven design
Up to speed in domain driven designRick van der Arend
 
Domain driven design in a nutshell
Domain driven design in a nutshellDomain driven design in a nutshell
Domain driven design in a nutshellToni Esteves
 
Three's a Party: How Trifectas Help Product, Engineering, and Design Work Tog...
Three's a Party: How Trifectas Help Product, Engineering, and Design Work Tog...Three's a Party: How Trifectas Help Product, Engineering, and Design Work Tog...
Three's a Party: How Trifectas Help Product, Engineering, and Design Work Tog...uxpin
 
Managing a Project the Drupal Way - Drupal Open Days Ireland
Managing a Project the Drupal Way - Drupal Open Days IrelandManaging a Project the Drupal Way - Drupal Open Days Ireland
Managing a Project the Drupal Way - Drupal Open Days IrelandEmma Jane Hogbin Westby
 
Code & Cannoli - Domain Driven Design
Code & Cannoli - Domain Driven DesignCode & Cannoli - Domain Driven Design
Code & Cannoli - Domain Driven DesignFrank Levering
 
Let's go to the whiteboard: how and why software developers use drawings
Let's go to the whiteboard: how and why software developers use drawingsLet's go to the whiteboard: how and why software developers use drawings
Let's go to the whiteboard: how and why software developers use drawingsMauro Cherubini
 
Dal modello Relazionale al Grafo: cosa cambia? By Alfonso Focareta
Dal modello Relazionale al Grafo: cosa cambia? By Alfonso Focareta Dal modello Relazionale al Grafo: cosa cambia? By Alfonso Focareta
Dal modello Relazionale al Grafo: cosa cambia? By Alfonso Focareta Codemotion
 
Introduction to Domain-Driven Design
Introduction to Domain-Driven DesignIntroduction to Domain-Driven Design
Introduction to Domain-Driven DesignR-P-Azevedo
 
Software Development in 21st Century
Software Development in 21st CenturySoftware Development in 21st Century
Software Development in 21st CenturyHenry Jacob
 
Keeping Architectures Relevant - 4 Feb 2010
Keeping Architectures Relevant - 4 Feb 2010Keeping Architectures Relevant - 4 Feb 2010
Keeping Architectures Relevant - 4 Feb 2010Paul Rayner
 
Os Alrubaie Ruby
Os Alrubaie RubyOs Alrubaie Ruby
Os Alrubaie Rubyoscon2007
 
Behavior Driven Development for Plugin Writers - AtlasCamp 2011
Behavior Driven Development for Plugin Writers - AtlasCamp 2011Behavior Driven Development for Plugin Writers - AtlasCamp 2011
Behavior Driven Development for Plugin Writers - AtlasCamp 2011Atlassian
 

Similar a Strategischer Anwendungsentwurf mit Domain-Driven Design (20)

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
 
Up to speed in domain driven design
Up to speed in domain driven designUp to speed in domain driven design
Up to speed in domain driven design
 
DDD knowledge sharing
DDD knowledge sharingDDD knowledge sharing
DDD knowledge sharing
 
DDD
DDDDDD
DDD
 
Domain driven design in a nutshell
Domain driven design in a nutshellDomain driven design in a nutshell
Domain driven design in a nutshell
 
Three's a Party: How Trifectas Help Product, Engineering, and Design Work Tog...
Three's a Party: How Trifectas Help Product, Engineering, and Design Work Tog...Three's a Party: How Trifectas Help Product, Engineering, and Design Work Tog...
Three's a Party: How Trifectas Help Product, Engineering, and Design Work Tog...
 
Managing a Project the Drupal Way - Drupal Open Days Ireland
Managing a Project the Drupal Way - Drupal Open Days IrelandManaging a Project the Drupal Way - Drupal Open Days Ireland
Managing a Project the Drupal Way - Drupal Open Days Ireland
 
Soliworks presentation
Soliworks presentationSoliworks presentation
Soliworks presentation
 
DDD for POs
DDD for POsDDD for POs
DDD for POs
 
Code & Cannoli - Domain Driven Design
Code & Cannoli - Domain Driven DesignCode & Cannoli - Domain Driven Design
Code & Cannoli - Domain Driven Design
 
Let's go to the whiteboard: how and why software developers use drawings
Let's go to the whiteboard: how and why software developers use drawingsLet's go to the whiteboard: how and why software developers use drawings
Let's go to the whiteboard: how and why software developers use drawings
 
SOAT Agile Day 2017 DDD
SOAT Agile Day 2017 DDDSOAT Agile Day 2017 DDD
SOAT Agile Day 2017 DDD
 
Wireframe like a UX Pro
Wireframe like a UX ProWireframe like a UX Pro
Wireframe like a UX Pro
 
Dal modello Relazionale al Grafo: cosa cambia? By Alfonso Focareta
Dal modello Relazionale al Grafo: cosa cambia? By Alfonso Focareta Dal modello Relazionale al Grafo: cosa cambia? By Alfonso Focareta
Dal modello Relazionale al Grafo: cosa cambia? By Alfonso Focareta
 
Introduction to Domain-Driven Design
Introduction to Domain-Driven DesignIntroduction to Domain-Driven Design
Introduction to Domain-Driven Design
 
Software Development in 21st Century
Software Development in 21st CenturySoftware Development in 21st Century
Software Development in 21st Century
 
Keeping Architectures Relevant - 4 Feb 2010
Keeping Architectures Relevant - 4 Feb 2010Keeping Architectures Relevant - 4 Feb 2010
Keeping Architectures Relevant - 4 Feb 2010
 
Os Alrubaie Ruby
Os Alrubaie RubyOs Alrubaie Ruby
Os Alrubaie Ruby
 
Behavior Driven Development for Plugin Writers - AtlasCamp 2011
Behavior Driven Development for Plugin Writers - AtlasCamp 2011Behavior Driven Development for Plugin Writers - AtlasCamp 2011
Behavior Driven Development for Plugin Writers - AtlasCamp 2011
 
Unit iii design patterns 9
Unit iii design patterns 9Unit iii design patterns 9
Unit iii design patterns 9
 

Más de Dennis Traub

Application Integration Patterns (not only) for Microservices
Application Integration Patterns (not only) for MicroservicesApplication Integration Patterns (not only) for Microservices
Application Integration Patterns (not only) for MicroservicesDennis Traub
 
Serverless SecOps Automation on AWS at AWS UG Krakow, Poland
Serverless SecOps Automation on AWS at AWS UG Krakow, PolandServerless SecOps Automation on AWS at AWS UG Krakow, Poland
Serverless SecOps Automation on AWS at AWS UG Krakow, PolandDennis Traub
 
Serverless Security Automation on AWS - Hamburg AWS User Group
Serverless Security Automation on AWS - Hamburg AWS User GroupServerless Security Automation on AWS - Hamburg AWS User Group
Serverless Security Automation on AWS - Hamburg AWS User GroupDennis Traub
 
Cloud ist keine Strategie - Keynote des AWS Cloud Day, Solingen
Cloud ist keine Strategie - Keynote des AWS Cloud Day, SolingenCloud ist keine Strategie - Keynote des AWS Cloud Day, Solingen
Cloud ist keine Strategie - Keynote des AWS Cloud Day, SolingenDennis Traub
 
Cloud ist keine Strategie - AWS Tech Community Summit Cologne, 2017
Cloud ist keine Strategie - AWS Tech Community Summit Cologne, 2017Cloud ist keine Strategie - AWS Tech Community Summit Cologne, 2017
Cloud ist keine Strategie - AWS Tech Community Summit Cologne, 2017Dennis Traub
 
Taming the Monolith - Microservices Meetup Hamburg
Taming the Monolith - Microservices Meetup HamburgTaming the Monolith - Microservices Meetup Hamburg
Taming the Monolith - Microservices Meetup HamburgDennis Traub
 
DDD / Microservices @ Trivento Spring Camp, Utrecht, 2015
DDD / Microservices @ Trivento Spring Camp, Utrecht, 2015DDD / Microservices @ Trivento Spring Camp, Utrecht, 2015
DDD / Microservices @ Trivento Spring Camp, Utrecht, 2015Dennis Traub
 
CQRS-Einführung - Teil 2
CQRS-Einführung - Teil 2CQRS-Einführung - Teil 2
CQRS-Einführung - Teil 2Dennis Traub
 
CQRS - Eine Einführung - NOUG 2011
CQRS - Eine Einführung - NOUG 2011CQRS - Eine Einführung - NOUG 2011
CQRS - Eine Einführung - NOUG 2011Dennis Traub
 

Más de Dennis Traub (9)

Application Integration Patterns (not only) for Microservices
Application Integration Patterns (not only) for MicroservicesApplication Integration Patterns (not only) for Microservices
Application Integration Patterns (not only) for Microservices
 
Serverless SecOps Automation on AWS at AWS UG Krakow, Poland
Serverless SecOps Automation on AWS at AWS UG Krakow, PolandServerless SecOps Automation on AWS at AWS UG Krakow, Poland
Serverless SecOps Automation on AWS at AWS UG Krakow, Poland
 
Serverless Security Automation on AWS - Hamburg AWS User Group
Serverless Security Automation on AWS - Hamburg AWS User GroupServerless Security Automation on AWS - Hamburg AWS User Group
Serverless Security Automation on AWS - Hamburg AWS User Group
 
Cloud ist keine Strategie - Keynote des AWS Cloud Day, Solingen
Cloud ist keine Strategie - Keynote des AWS Cloud Day, SolingenCloud ist keine Strategie - Keynote des AWS Cloud Day, Solingen
Cloud ist keine Strategie - Keynote des AWS Cloud Day, Solingen
 
Cloud ist keine Strategie - AWS Tech Community Summit Cologne, 2017
Cloud ist keine Strategie - AWS Tech Community Summit Cologne, 2017Cloud ist keine Strategie - AWS Tech Community Summit Cologne, 2017
Cloud ist keine Strategie - AWS Tech Community Summit Cologne, 2017
 
Taming the Monolith - Microservices Meetup Hamburg
Taming the Monolith - Microservices Meetup HamburgTaming the Monolith - Microservices Meetup Hamburg
Taming the Monolith - Microservices Meetup Hamburg
 
DDD / Microservices @ Trivento Spring Camp, Utrecht, 2015
DDD / Microservices @ Trivento Spring Camp, Utrecht, 2015DDD / Microservices @ Trivento Spring Camp, Utrecht, 2015
DDD / Microservices @ Trivento Spring Camp, Utrecht, 2015
 
CQRS-Einführung - Teil 2
CQRS-Einführung - Teil 2CQRS-Einführung - Teil 2
CQRS-Einführung - Teil 2
 
CQRS - Eine Einführung - NOUG 2011
CQRS - Eine Einführung - NOUG 2011CQRS - Eine Einführung - NOUG 2011
CQRS - Eine Einführung - NOUG 2011
 

Último

DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 

Último (20)

DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 

Strategischer Anwendungsentwurf mit Domain-Driven Design

  • 1. Strategischer Anwendungsentwurf mit Domain-Driven Design presented by Dennis Traub .NET Usergroup Zentralschweiz - 18. März 2013 Dennis Traub – Software Development Consultancy @dtraub – mail@dennistraub.de
  • 2. Now, who‘s that guy? Dennis Traub Founder, Owner, CEO, Single Employee of D. Traub Software Development Consultancy Consultant, developer, trainer, speaker 39 years old Married, father of one 20+ years in software development Hire me at mail@dennistraub.de @dtraub Dennis Traub – Software Development Consultancy @dtraub – mail@dennistraub.de
  • 3. AGENDA The Blue Book An Example Break Tactical Patterns Actually it should Bounded Contexts A short review of be two books! and Subdomains the Building Blocks 1 2 3 4 5 6 Terminology Lasagna End of Strategic Design … the new Spaghetti Questions & Answers Dennis Traub – Software Development Consultancy @dtraub – mail@dennistraub.de
  • 4. AGENDA The Blue Book An Example Tactical Patterns Actually it should Bounded Contexts A short review of be two books! and Subdomains the Building Blocks 1 2 3 4 5 6 Terminology Lasagna End of Strategic Design … the new Spaghetti Questions & Answers Dennis Traub – Software Development Consultancy @dtraub – mail@dennistraub.de
  • 5. The „Blue Book“ by Eric Evans Image Placeholder Dennis Traub – Software Development Consultancy @dtraub – mail@dennistraub.de
  • 6. The „Blue Book“ by Eric Evans • Entities • Value Objects Tactical • Aggregates Class • Repositories Design • Services • Factories • etc. It should be two books! • Model Integrity • Large-Scale Structure • Bounded Contexts Strategic • Core Domain DDD • Context Maps • Ubiquitous Language • etc. Dennis Traub – Software Development Consultancy @dtraub – mail@dennistraub.de
  • 7. AGENDA The Blue Book An Example Tactical Patterns Actually it should Bounded Contexts A short review of be two books! and Subdomains the Building Blocks 1 2 3 4 5 6 Terminology Lasagna End of Strategic Design … the new Spaghetti Questions & Answers Dennis Traub – Software Development Consultancy @dtraub – mail@dennistraub.de
  • 8. Domain Dennis Traub – Software Development Consultancy @dtraub – mail@dennistraub.de
  • 9. Domain a sphere of knowledge, influence, or activity Dennis Traub – Software Development Consultancy @dtraub – mail@dennistraub.de
  • 10. Domain what an organization does and the world it does it in Dennis Traub – Software Development Consultancy @dtraub – mail@dennistraub.de
  • 11. Domain Model Dennis Traub – Software Development Consultancy @dtraub – mail@dennistraub.de
  • 12. Domain Model a system of abstractions that describes selected aspects of a domain Dennis Traub – Software Development Consultancy @dtraub – mail@dennistraub.de
  • 13. Domain Model can be used to solve problems related to that domain Dennis Traub – Software Development Consultancy @dtraub – mail@dennistraub.de
  • 14. don‘t model reality Dennis Traub – Software Development Consultancy @dtraub – mail@dennistraub.de
  • 15. we model useful abstractions of reality Dennis Traub – Software Development Consultancy @dtraub – mail@dennistraub.de
  • 16. Ubiquitous Language Dennis Traub – Software Development Consultancy @dtraub – mail@dennistraub.de
  • 17. Ubiquitous Language a language structured around the domain model Dennis Traub – Software Development Consultancy @dtraub – mail@dennistraub.de
  • 18. Ubiquitous Language used by all team members Dennis Traub – Software Development Consultancy @dtraub – mail@dennistraub.de
  • 19. Bounded Context Dennis Traub – Software Development Consultancy @dtraub – mail@dennistraub.de
  • 20. Bounded Context an explicit boundary within which a domain model exists Dennis Traub – Software Development Consultancy @dtraub – mail@dennistraub.de
  • 21. Bounded Context inside the boundary all terms have specific meaning Dennis Traub – Software Development Consultancy @dtraub – mail@dennistraub.de
  • 22. Bounded Context these terms are part of the context‘s ubiquitous language Dennis Traub – Software Development Consultancy @dtraub – mail@dennistraub.de
  • 23. Subdomains Dennis Traub – Software Development Consultancy @dtraub – mail@dennistraub.de
  • 24. Subdomains the whole domain of the organization is comprised of subdomains Dennis Traub – Software Development Consultancy @dtraub – mail@dennistraub.de
  • 25. Subdomains they focus on only one specific area of the whole business domain Dennis Traub – Software Development Consultancy @dtraub – mail@dennistraub.de
  • 26. Core Domain Dennis Traub – Software Development Consultancy @dtraub – mail@dennistraub.de
  • 27. Core Domain the distinctive part of the model, central to the users‘ goals Dennis Traub – Software Development Consultancy @dtraub – mail@dennistraub.de
  • 28. Core Domain differentiates the application and makes it valuable Dennis Traub – Software Development Consultancy @dtraub – mail@dennistraub.de
  • 29. Core Domain the most important subdomain Dennis Traub – Software Development Consultancy @dtraub – mail@dennistraub.de
  • 30. AGENDA The Blue Book An Example Tactical Patterns Actually it should Bounded Contexts A short review of be two books! and Subdomains the Building Blocks 1 2 3 4 5 6 Terminology Lasagna End of Strategic Design … the new Spaghetti Questions & Answers Dennis Traub – Software Development Consultancy @dtraub – mail@dennistraub.de
  • 31. Our Domain: Dennis Traub – Software Development Consultancy @dtraub – mail@dennistraub.de
  • 32. Aviation Dennis Traub – Software Development Consultancy @dtraub – mail@dennistraub.de
  • 33. Our Application: Dennis Traub – Software Development Consultancy @dtraub – mail@dennistraub.de
  • 34. Ambulance Flight Management Dennis Traub – Software Development Consultancy @dtraub – mail@dennistraub.de
  • 35. Ambulance Flight Management order flights from an operator dispatch patients assign medical staff Dennis Traub – Software Development Consultancy @dtraub – mail@dennistraub.de
  • 36. Bounded Contexts 1 Patiententransport-Disposition 2 Flugplanung und -durchführung 3 Personaleinsatzplanung (Flugärzte, Rettungsassistenten) 4 Patientendaten, Abrechnung, Buchhaltung 5 SOAP- oder REST-Services, Web-Oberfläche Dennis Traub – Software Development Consultancy @dtraub – mail@dennistraub.de
  • 37. Subdomains 1 Ambulanzflug-Disposition 6 Bodentransport 2 Flotten-Management 7 Abrechnung, Buchhaltung 3 Flugplanung 8 Anwendungsoberfläche 4 Passagier-/Patientendaten 9 SOAP-/REST-Schnittstelle 5 Medizinisches Personal 10 Benutzer- und Zugriffssteuerung Dennis Traub – Software Development Consultancy @dtraub – mail@dennistraub.de
  • 38. don‘t build a model that works for everyone Dennis Traub – Software Development Consultancy @dtraub – mail@dennistraub.de
  • 39. to focus our effort and resources we ask two questions for each subdomain Dennis Traub – Software Development Consultancy @dtraub – mail@dennistraub.de
  • 40. 1 how complex is it? Dennis Traub – Software Development Consultancy @dtraub – mail@dennistraub.de
  • 41. 2 what‘s the value to our specific problem? (if we model it ourselves) Dennis Traub – Software Development Consultancy @dtraub – mail@dennistraub.de
  • 42. 1. Complexity (S/M/H) 1 Ambulanzflug-Disposition 6 Bodentransport 2 Flotten-Management 7 Abrechnung, Buchhaltung 3 Flugplanung 8 Anwendungsoberfläche 4 Passagier-/Patientendaten 9 SOAP-/REST-Schnittstelle 5 Medizinisches Personal 10 Benutzer- und Zugriffssteuerung Dennis Traub – Software Development Consultancy @dtraub – mail@dennistraub.de
  • 43. 2. Value (S/M/H) 1 Ambulanzflug-Disposition 6 Bodentransport 2 Flotten-Management 7 Abrechnung, Buchhaltung 3 Flugplanung 8 Anwendungsoberfläche 4 Passagier-/Patientendaten 9 SOAP-/REST-Schnittstelle 5 Medizinisches Personal 10 Benutzer- und Zugriffssteuerung Dennis Traub – Software Development Consultancy @dtraub – mail@dennistraub.de
  • 44. the tactical Building Blocks we don‘t use DDD when there is no value in formalizing the problem Dennis Traub – Software Development Consultancy @dtraub – mail@dennistraub.de
  • 45. we only use DDD in parts where we get a competitive advantage Dennis Traub – Software Development Consultancy @dtraub – mail@dennistraub.de
  • 46. 15 minutes BREAK Dennis Traub – Software Development Consultancy @dtraub – mail@dennistraub.de
  • 47. AGENDA The Blue Book An Example Tactical Patterns Actually it should Bounded Contexts A short review of be two books! and Subdomains the Building Blocks 1 2 3 4 5 6 Terminology Lasagna End of Strategic Design … the new Spaghetti Questions & Answers Dennis Traub – Software Development Consultancy @dtraub – mail@dennistraub.de
  • 48. Presentation Layer Common Services Infrastructure Application Services Domain / Business Model / BLL DAL / O/R-Mapper Dennis Traub – Software Development Consultancy @dtraub – mail@dennistraub.de
  • 49. Ports & Adapters Hexagonal Architecture Onion Architecture Dennis Traub – Software Development Consultancy @dtraub – mail@dennistraub.de
  • 50. Dependency Inversion Principle (just in case) the D in SOLID Dennis Traub – Software Development Consultancy @dtraub – mail@dennistraub.de
  • 51. AGENDA The Blue Book An Example Tactical Patterns Actually it should Bounded Contexts A short review of be two books! and Subdomains the Building Blocks 1 2 3 4 5 6 Terminology Lasagna End of Strategic Design … the new Spaghetti Questions & Answers Dennis Traub – Software Development Consultancy @dtraub – mail@dennistraub.de
  • 52. Entity Dennis Traub – Software Development Consultancy @dtraub – mail@dennistraub.de
  • 53. Entity an object primarily defined by its identity Dennis Traub – Software Development Consultancy @dtraub – mail@dennistraub.de
  • 54. Entity has a life cycle that can radically change its form and content Dennis Traub – Software Development Consultancy @dtraub – mail@dennistraub.de
  • 55. Value Object Dennis Traub – Software Development Consultancy @dtraub – mail@dennistraub.de
  • 56. Value Object an object that represents a descriptive aspect of the domain Dennis Traub – Software Development Consultancy @dtraub – mail@dennistraub.de
  • 57. Value Object doesn‘t have a distinct identity treated as immutable Dennis Traub – Software Development Consultancy @dtraub – mail@dennistraub.de
  • 58. Aggregate Dennis Traub – Software Development Consultancy @dtraub – mail@dennistraub.de
  • 59. Aggregate a cluster of associated objects Dennis Traub – Software Development Consultancy @dtraub – mail@dennistraub.de
  • 60. Aggregate treated as a unit for the purpose of data changes Dennis Traub – Software Development Consultancy @dtraub – mail@dennistraub.de
  • 61. Aggregate a set of consistency rules applies within the aggregate‘s boundaries Dennis Traub – Software Development Consultancy @dtraub – mail@dennistraub.de
  • 62. Aggregate enforces its own invariants and is always in a valid state Dennis Traub – Software Development Consultancy @dtraub – mail@dennistraub.de
  • 63. AGENDA The Blue Book An Example Tactical Patterns Actually it should Bounded Contexts A short review of be two books! and Subdomains the Building Blocks 1 2 3 4 5 6 Terminology Lasagna End of Strategic Design … the new Spaghetti Questions & Answers Dennis Traub – Software Development Consultancy @dtraub – mail@dennistraub.de
  • 64. To summarize: DDD is basically the application of the SOLID principles of object-orientation on an architectural level Dennis Traub – Software Development Consultancy @dtraub – mail@dennistraub.de
  • 65. ? QUESTIONS Dennis Traub – Software Development Consultancy @dtraub – mail@dennistraub.de
  • 66. THANK YOU! follow me: @dtraub Dennis Traub – Software Development Consultancy @dtraub – mail@dennistraub.de