SlideShare une entreprise Scribd logo
1  sur  46
Télécharger pour lire hors ligne
DDD
                         Domain Driven Design - The way back to OO!



                            Felipe Rodrigues de Almeida




DDD   blog.fratech.net                                           1
ToPiCS

                         The Problem
                          Where are we missing the way?                   3


                         The CoNCePT
                          What is DDD about?                               4
                          Why use DDD?                                     6
                          Where are we missing the way? (Fixes)            8
                          Layered Architecture                            14


                         The way baCk
                          Domain Objects                                  19
                          Entities, Services, Value Objects and Modules   21
                          Objects Life-Cycle                              26


                         The meaNiNg
                          Meaning What?                                   30
                          Ubiquitous Language                             31
                          Supple Design                                   32
                          Strategic Design                                34




DDD   blog.fratech.net                                                         2
The Problem

                         where are we missing the way?

•	 What is important? What is urgent?

•	 Domain Models vs Manager Models (MOP)

•	 Bad Communication

•	 Architects thinking only about infra-structure

•	 We have lost real Object Orientation


DDD   blog.fratech.net                               3
The CoNCePT

                                   what is DDD about?

Domain means “a sphere of knowledge, influency and activity “
of a situation


So, Domain Driven Design means, design (a software) driven
(oriented) by it knowledge, influency and activity




DDD   blog.fratech.net                                      4
The CoNCePT

                                      what is DDD about?


Above all, DDD is about to take the domain (a sphere of
knowledge, influency and activity) and represent it in objects



                     DDD is the way back to OO!!!



DDD   blog.fratech.net                                       5
The CoNCePT

                                        why to use DDD?



More than just a concept, DDD is a process to find out how to
build a system and also to define how to treat specific business
issues




DDD   blog.fratech.net                                         6
The CoNCePT

                                          why to use DDD?


Using DDD as a process you will be able to:

•	 really use all those things your teacher said you could when you
   were learning OO
•	 avoid the Manager(Service) Model (MOP), which requires knowledge
   about a specific implementation This kind o design is composed
   only by services
•	 improve the comunication between your team and the customer


DDD   blog.fratech.net                                            7
The CoNCePT

                  where are we missing the way? (Fixes)

•	 What is important? What is urgent?
The business is important and the customer too Let`s give some
attention to business and customer comunication!

             Important aspects cannot be left behind.




DDD   blog.fratech.net                                       8
The CoNCePT

                   where are we missing the way? (Fixes)

•	 Domain Models vs Manager Models(services) MOP
Domain Models treat the business like objects, services and
compositions, concerned about the way things are connected
in the real world

      Developing software is not about creating makers.




DDD    blog.fratech.net                                   9
The CoNCePT

                  where are we missing the way? (Fixes)


•	 Bad Comunication
The words you use when you are trying to explain a situation to
your customer, who doesn’t know the system, are responsible
for misunderstanding Talking with him using his business terms,
will make for better communication

           Use the customers words to communicate!



DDD   blog.fratech.net                                       10
The CoNCePT

                  where are we missing the way? (Fixes)
•	 Architects thinking only about infra-structure
Architects are “freak“ people that usually think about technical
stuff and forget what is important to the customer

                  We have to think about business too.

Using DDD design will focus on business situations The internal
transfer of knowledge is easier since communication will be
improved as well


DDD   blog.fratech.net                                        11
The CoNCePT

                  where are we missing the way? (Fixes)
•	 We have lost real Object Orientation
Object orientation is about the use of objects and their
interactions to design software

At design time, we have to find objects from the real world,
                to use for the specific case.


  Each domain model is singular and is not applicable to
                  another model.
DDD   blog.fratech.net                                     12
The meaNiNg

                                             wait a minute!
You said: “Each domain model is singular and is not applicable to
another model.”
If I am in an enterprise, why should I have more than 1 model to
describe a single “thing”, perhaps even more that 1 model per
application As a proponent of DRY, this doesn’t make sense to
me




DDD   blog.fratech.net                                         13
The CoNCePT

                                   layered architecture
A layered architecture at heart, is a way to separate concerns




 Domain model depends on some infrastructure, but not
           on a specific impementation.




DDD   blog.fratech.net                                           14
The CoNCePT

                                            Presentation layer
Responsible for interacting with the user, getting information
from the user and showing information to the user


The presentation layer usually depends on the application
                         layer or Data Source Layer!




DDD   blog.fratech.net                                       15
The CoNCePT

                                         application layer
Works as delivery, coordinating tasks which the system is
responsible for doing This layer has no business rules and is only
responsible for delegating work to domain objects Its objects
do not have state to reflect business situation, but can have
state of a task’ s progress


Consists of a set of decorators, delegating calls to domain
                             layer.


DDD   blog.fratech.net                                          16
The CoNCePT

                                          Data Source layer
A set of generic technical capabilities, providing support for
higher layers


                  Here goes the most technical things!




DDD   blog.fratech.net                                      17
The CoNCePT

                                             Domain layer
Represents the concepts of business information and business
situation


A set of generic technical capabilities, providing support for
higher layers


          This layer is the heart of business software!



DDD   blog.fratech.net                                      18
The way baCk

                                       Domain objects
Domain Objects are instances of real entities which hold any
knowledgenemt, influency or activity of a situation
We can figure out which domain objects we need, by talking to
domain experts

Focusing on key words will help to define domain objects.




DDD   blog.fratech.net                                      19
The way baCk

                          Domain objects




DDD   blog.fratech.net                 20
The way baCk

                                                     entities
Any object which has an identity Usually is mapped to real world
objects


                         Unique set of data.




DDD   blog.fratech.net                                        21
The way baCk

                                                    Value objects
Used to describe characteristic of things It is part of the domain
as much as entities, but is always under some model element,
since it has no identity


                         Set of data without identity.




DDD   blog.fratech.net                                          22
The way baCk

                                                         Services
Services are a standalone interface, which holds operations that
don’t fit in any object in the model


               It is not a thing, but a set of operations.




DDD   blog.fratech.net                                          23
The meaNiNg

                                             wait a minute!
You’ve said earlier that DDD is better than service/manager
models, but here you’re saying that DDD uses services Make
sure that you describe how this type of service is different from
the other




DDD   blog.fratech.net                                         24
The way baCk

                                                  modules
Organize your domain objects by modules, then whenever you
need anything you know where it is


           Don’t drive your modules by infrastrucure.




DDD   blog.fratech.net                                   25
The way baCk

                                        objects life Cycle
Once you have decided the main objects of your system, you
then know about its life cyle How will it interact in the model?
Who is able to use it?
Aggregate, Factory and Repository patterns stand for objects
life cycle


      The point is avoid showing internal complexity to the
                             client.

DDD      blog.fratech.net                                     26
The way baCk

                                                          aggregates
A set of objects with a unique interface for external calls Indicated
for cases where you need keep consistent a set of objects


 Aggregates always have a root responsible for being the
                         interface for others elements.




DDD   blog.fratech.net                                             27
The way baCk

                                                Factories
Responsible for creation of domain objects or even an entire
aggregate


 Required only when creation becomes too complicated.




DDD   blog.fratech.net                                     28
The way baCk

                                            repositories
Works as a “repository“ for domain objects Provides a simple
interface for complex persistence operations Can encapsulate
several data sources for a object


  Make a repository whenever you find a type that needs
                         global access.




DDD   blog.fratech.net                                     29
The meaNiNg

                                         meaning what?
All software has a meaning Modeling is about find the meaning
of software


  Find the meaning, express it and you will have a great
                          model.




DDD   blog.fratech.net                                      30
The meaNiNg

                                        Ubiquitous language
Created by the team, maintained by the team and for the team
Ubiquitous Language has to be concerned about the business
in question


      Works like a dictionary, composed by the terms taken
                            from Domain Experts.




DDD      blog.fratech.net                                    31
The meaNiNg

                                            Supple Design
Created by the team, mainteined by the team and for the team
Have to concern about the business in question


           A set of concepts to make a flexible design.




DDD   blog.fratech.net                                     32
The meaNiNg

                           Supple Design - Some Patterns
x     Intention-Revealing Interfaces
x     Standalone Classes
x     Conceptual Contours




DDD     blog.fratech.net                               33
The meaNiNg

                                        Strategic Design
A set of good pratices to achieve a good Domain Model
These patterns can works as a check list to improve the design
quality


If you want you can express these patterns as documents.




DDD   blog.fratech.net                                      34
The meaNiNg

                         Strategic Design




DDD   blog.fratech.net                  35
The meaNiNg

                         Strategic Design




DDD   blog.fratech.net                  36
The meaNiNg

                         Strategic Design




DDD   blog.fratech.net                  37
The meaNiNg

                         Strategic Design




DDD   blog.fratech.net                  38
The meaNiNg

                         Strategic Design




DDD   blog.fratech.net                  39
The meaNiNg

                         Strategic Design




DDD   blog.fratech.net                  40
The meaNiNg

                         Strategic Design




DDD   blog.fratech.net                  41
The meaNiNg

                         Strategic Design




DDD   blog.fratech.net                  42
The meaNiNg

                                             wait a minute!
Have you considered making a connection between “Published
Language” and DSLs? I forgot about this aspect, but using DDD
is a fantastic way to have an architecture that can transform into
a DSL via this route




DDD   blog.fratech.net                                          43
The meaNiNg

                         Strategic Design




DDD   blog.fratech.net                  44
waiT a miNUTe!



      * The “Wait a minute!” questions are real questions from Ian
          Roughley after review this document. Thank you Ian!
                            ** No, that man is not Ian.




DDD      blog.fratech.net                                            45
The eND



                             obrigado!
                         Felipe Rodrigues de Almeida
                             felipe@fratech net
                              blog fratech net



DDD   blog.fratech.net                                       46

Contenu connexe

En vedette

Udi Dahan Intentions And Interfaces
Udi Dahan Intentions And InterfacesUdi Dahan Intentions And Interfaces
Udi Dahan Intentions And Interfacesdeimos
 
What is "Domain Driven Design" and what can you expect from it?
What is "Domain Driven Design" and what can you expect from it?What is "Domain Driven Design" and what can you expect from it?
What is "Domain Driven Design" and what can you expect from it?Tom Janssens
 
Saved (part4)
Saved (part4)Saved (part4)
Saved (part4)jzatko
 
PolyU BBA Management
PolyU BBA ManagementPolyU BBA Management
PolyU BBA Managementpolyduck
 
Present Perfect: forms and uses
Present Perfect: forms and usesPresent Perfect: forms and uses
Present Perfect: forms and usesMaribel Gonzalez
 
Myths and Realities of Cloud Data Security
Myths and Realities of Cloud Data SecurityMyths and Realities of Cloud Data Security
Myths and Realities of Cloud Data SecurityMichael Krouze
 
Jardinsde Montreal
Jardinsde MontrealJardinsde Montreal
Jardinsde MontrealDescojonate
 
SXSW How Companies Created Buzz
SXSW How Companies Created Buzz SXSW How Companies Created Buzz
SXSW How Companies Created Buzz Shashi Bellamkonda
 
Libraries and Transliteracy KLA
Libraries and Transliteracy KLALibraries and Transliteracy KLA
Libraries and Transliteracy KLABobbi Newman
 
Culturismo Al Extremo
Culturismo Al ExtremoCulturismo Al Extremo
Culturismo Al ExtremoDescojonate
 
Paul Fremantle Restful SOA Registry
Paul Fremantle Restful SOA RegistryPaul Fremantle Restful SOA Registry
Paul Fremantle Restful SOA Registrydeimos
 
Jeremy Vickers Liquidity Hub
Jeremy Vickers Liquidity HubJeremy Vickers Liquidity Hub
Jeremy Vickers Liquidity Hubdeimos
 
Portent Webinar: Next-Level Segmentation
Portent Webinar: Next-Level SegmentationPortent Webinar: Next-Level Segmentation
Portent Webinar: Next-Level SegmentationIan Lurie
 
Death of Balzac - Victor Hugo
Death of Balzac - Victor HugoDeath of Balzac - Victor Hugo
Death of Balzac - Victor Hugohonore
 
Putting Strategy into Your Social Media Outreach
Putting Strategy into Your Social Media OutreachPutting Strategy into Your Social Media Outreach
Putting Strategy into Your Social Media OutreachKivi Leroux Miller
 
Internet Marketing: Conversation marketing
Internet Marketing: Conversation marketingInternet Marketing: Conversation marketing
Internet Marketing: Conversation marketingIan Lurie
 

En vedette (20)

Udi Dahan Intentions And Interfaces
Udi Dahan Intentions And InterfacesUdi Dahan Intentions And Interfaces
Udi Dahan Intentions And Interfaces
 
What is "Domain Driven Design" and what can you expect from it?
What is "Domain Driven Design" and what can you expect from it?What is "Domain Driven Design" and what can you expect from it?
What is "Domain Driven Design" and what can you expect from it?
 
Saved (part4)
Saved (part4)Saved (part4)
Saved (part4)
 
PolyU BBA Management
PolyU BBA ManagementPolyU BBA Management
PolyU BBA Management
 
Present Perfect: forms and uses
Present Perfect: forms and usesPresent Perfect: forms and uses
Present Perfect: forms and uses
 
Myths and Realities of Cloud Data Security
Myths and Realities of Cloud Data SecurityMyths and Realities of Cloud Data Security
Myths and Realities of Cloud Data Security
 
Jardinsde Montreal
Jardinsde MontrealJardinsde Montreal
Jardinsde Montreal
 
SXSW How Companies Created Buzz
SXSW How Companies Created Buzz SXSW How Companies Created Buzz
SXSW How Companies Created Buzz
 
Library Got Game
Library Got GameLibrary Got Game
Library Got Game
 
Libraries and Transliteracy KLA
Libraries and Transliteracy KLALibraries and Transliteracy KLA
Libraries and Transliteracy KLA
 
Culturismo Al Extremo
Culturismo Al ExtremoCulturismo Al Extremo
Culturismo Al Extremo
 
Paul Fremantle Restful SOA Registry
Paul Fremantle Restful SOA RegistryPaul Fremantle Restful SOA Registry
Paul Fremantle Restful SOA Registry
 
Goalswithocw
GoalswithocwGoalswithocw
Goalswithocw
 
Jeremy Vickers Liquidity Hub
Jeremy Vickers Liquidity HubJeremy Vickers Liquidity Hub
Jeremy Vickers Liquidity Hub
 
Portent Webinar: Next-Level Segmentation
Portent Webinar: Next-Level SegmentationPortent Webinar: Next-Level Segmentation
Portent Webinar: Next-Level Segmentation
 
Dont Hug Me
Dont Hug MeDont Hug Me
Dont Hug Me
 
Death of Balzac - Victor Hugo
Death of Balzac - Victor HugoDeath of Balzac - Victor Hugo
Death of Balzac - Victor Hugo
 
Suerte
SuerteSuerte
Suerte
 
Putting Strategy into Your Social Media Outreach
Putting Strategy into Your Social Media OutreachPutting Strategy into Your Social Media Outreach
Putting Strategy into Your Social Media Outreach
 
Internet Marketing: Conversation marketing
Internet Marketing: Conversation marketingInternet Marketing: Conversation marketing
Internet Marketing: Conversation marketing
 

Similaire à Felipe Rodrigues Ddd The Way Back To Oo

Domain Driven Design Development Spring Portfolio
Domain Driven Design Development Spring PortfolioDomain Driven Design Development Spring Portfolio
Domain Driven Design Development Spring PortfolioSrini Penchikala
 
Adopting Domain-Driven Design in your organization
Adopting Domain-Driven Design in your organizationAdopting Domain-Driven Design in your organization
Adopting Domain-Driven Design in your organizationAleix Morgadas
 
JavaFest. Антон Лемешко. Model-Driven Development in the Open Java Universe
JavaFest. Антон Лемешко. Model-Driven Development in the Open Java UniverseJavaFest. Антон Лемешко. Model-Driven Development in the Open Java Universe
JavaFest. Антон Лемешко. Model-Driven Development in the Open Java UniverseFestGroup
 
An illustrated guide to microservices (boston python meetup - Aug 2016)
An illustrated guide to microservices (boston python meetup - Aug 2016)An illustrated guide to microservices (boston python meetup - Aug 2016)
An illustrated guide to microservices (boston python meetup - Aug 2016)Ambassador Labs
 
The art of computer programming
The art of computer programmingThe art of computer programming
The art of computer programmingClaude Sajous
 
Hook42 zero-to-go-pt1-business-v2
Hook42 zero-to-go-pt1-business-v2Hook42 zero-to-go-pt1-business-v2
Hook42 zero-to-go-pt1-business-v2aimeeAThook42
 
Hook42 zero-to-go-pt1-business-v2
Hook42 zero-to-go-pt1-business-v2Hook42 zero-to-go-pt1-business-v2
Hook42 zero-to-go-pt1-business-v2hook42inc
 
NDC 2011 - SpecFlow: Pragmatic BDD for .NET
NDC 2011 - SpecFlow: Pragmatic BDD for .NETNDC 2011 - SpecFlow: Pragmatic BDD for .NET
NDC 2011 - SpecFlow: Pragmatic BDD for .NETjbandi
 
Case Study: Practical tools and strategies for tackling legacy practices and ...
Case Study: Practical tools and strategies for tackling legacy practices and ...Case Study: Practical tools and strategies for tackling legacy practices and ...
Case Study: Practical tools and strategies for tackling legacy practices and ...Alejandro S.
 
SE2_Lec 19_Design Principles and Design Patterns
SE2_Lec 19_Design Principles and Design PatternsSE2_Lec 19_Design Principles and Design Patterns
SE2_Lec 19_Design Principles and Design PatternsAmr E. Mohamed
 
An illustrated guide to microservices (ploneconf 10 21-2016)
An illustrated guide to microservices (ploneconf 10 21-2016)An illustrated guide to microservices (ploneconf 10 21-2016)
An illustrated guide to microservices (ploneconf 10 21-2016)Ambassador Labs
 
Domain Driven Design Introduction
Domain Driven Design IntroductionDomain Driven Design Introduction
Domain Driven Design Introductionwojtek_s
 
DDD - 1 - A gentle introduction to Domain Driven Design.pdf
DDD - 1 - A gentle introduction to Domain Driven Design.pdfDDD - 1 - A gentle introduction to Domain Driven Design.pdf
DDD - 1 - A gentle introduction to Domain Driven Design.pdfEleonora Ciceri
 
Georgia State Presentation
Georgia State PresentationGeorgia State Presentation
Georgia State Presentationpatrickbrandt
 
The value of a platform approach for ECM
The value of a platform approach for ECMThe value of a platform approach for ECM
The value of a platform approach for ECMNuxeo
 
SE2018_Lec 18_ Design Principles and Design Patterns
SE2018_Lec 18_ Design Principles and Design PatternsSE2018_Lec 18_ Design Principles and Design Patterns
SE2018_Lec 18_ Design Principles and Design PatternsAmr E. Mohamed
 
Domain Driven Design for Angular
Domain Driven Design for AngularDomain Driven Design for Angular
Domain Driven Design for AngularJennifer Estrada
 

Similaire à Felipe Rodrigues Ddd The Way Back To Oo (20)

Domain Driven Design Development Spring Portfolio
Domain Driven Design Development Spring PortfolioDomain Driven Design Development Spring Portfolio
Domain Driven Design Development Spring Portfolio
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
Adopting Domain-Driven Design in your organization
Adopting Domain-Driven Design in your organizationAdopting Domain-Driven Design in your organization
Adopting Domain-Driven Design in your organization
 
JavaFest. Антон Лемешко. Model-Driven Development in the Open Java Universe
JavaFest. Антон Лемешко. Model-Driven Development in the Open Java UniverseJavaFest. Антон Лемешко. Model-Driven Development in the Open Java Universe
JavaFest. Антон Лемешко. Model-Driven Development in the Open Java Universe
 
An illustrated guide to microservices (boston python meetup - Aug 2016)
An illustrated guide to microservices (boston python meetup - Aug 2016)An illustrated guide to microservices (boston python meetup - Aug 2016)
An illustrated guide to microservices (boston python meetup - Aug 2016)
 
The art of computer programming
The art of computer programmingThe art of computer programming
The art of computer programming
 
Hook42 zero-to-go-pt1-business-v2
Hook42 zero-to-go-pt1-business-v2Hook42 zero-to-go-pt1-business-v2
Hook42 zero-to-go-pt1-business-v2
 
Hook42 zero-to-go-pt1-business-v2
Hook42 zero-to-go-pt1-business-v2Hook42 zero-to-go-pt1-business-v2
Hook42 zero-to-go-pt1-business-v2
 
NDC 2011 - SpecFlow: Pragmatic BDD for .NET
NDC 2011 - SpecFlow: Pragmatic BDD for .NETNDC 2011 - SpecFlow: Pragmatic BDD for .NET
NDC 2011 - SpecFlow: Pragmatic BDD for .NET
 
Case Study: Practical tools and strategies for tackling legacy practices and ...
Case Study: Practical tools and strategies for tackling legacy practices and ...Case Study: Practical tools and strategies for tackling legacy practices and ...
Case Study: Practical tools and strategies for tackling legacy practices and ...
 
SE2_Lec 19_Design Principles and Design Patterns
SE2_Lec 19_Design Principles and Design PatternsSE2_Lec 19_Design Principles and Design Patterns
SE2_Lec 19_Design Principles and Design Patterns
 
An illustrated guide to microservices (ploneconf 10 21-2016)
An illustrated guide to microservices (ploneconf 10 21-2016)An illustrated guide to microservices (ploneconf 10 21-2016)
An illustrated guide to microservices (ploneconf 10 21-2016)
 
Let's talk about... Microservices
Let's talk about... MicroservicesLet's talk about... Microservices
Let's talk about... Microservices
 
Domain Driven Design Introduction
Domain Driven Design IntroductionDomain Driven Design Introduction
Domain Driven Design Introduction
 
DDD - 1 - A gentle introduction to Domain Driven Design.pdf
DDD - 1 - A gentle introduction to Domain Driven Design.pdfDDD - 1 - A gentle introduction to Domain Driven Design.pdf
DDD - 1 - A gentle introduction to Domain Driven Design.pdf
 
Georgia State Presentation
Georgia State PresentationGeorgia State Presentation
Georgia State Presentation
 
The value of a platform approach for ECM
The value of a platform approach for ECMThe value of a platform approach for ECM
The value of a platform approach for ECM
 
SE2018_Lec 18_ Design Principles and Design Patterns
SE2018_Lec 18_ Design Principles and Design PatternsSE2018_Lec 18_ Design Principles and Design Patterns
SE2018_Lec 18_ Design Principles and Design Patterns
 
Domain Driven Design for Angular
Domain Driven Design for AngularDomain Driven Design for Angular
Domain Driven Design for Angular
 

Plus de deimos

Aspect Orientated Programming in Ruby
Aspect Orientated Programming in RubyAspect Orientated Programming in Ruby
Aspect Orientated Programming in Rubydeimos
 
Randy Shoup eBays Architectural Principles
Randy Shoup eBays Architectural PrinciplesRandy Shoup eBays Architectural Principles
Randy Shoup eBays Architectural Principlesdeimos
 
Remy Sharp The DOM scripting toolkit jQuery
Remy Sharp The DOM scripting toolkit jQueryRemy Sharp The DOM scripting toolkit jQuery
Remy Sharp The DOM scripting toolkit jQuerydeimos
 
Ola Bini J Ruby Power On The Jvm
Ola Bini J Ruby Power On The JvmOla Bini J Ruby Power On The Jvm
Ola Bini J Ruby Power On The Jvmdeimos
 
Joe Walker Interactivewebsites Cometand Dwr
Joe Walker Interactivewebsites Cometand DwrJoe Walker Interactivewebsites Cometand Dwr
Joe Walker Interactivewebsites Cometand Dwrdeimos
 
Aslak Hellesoy Executable User Stories R Spec Bdd
Aslak Hellesoy Executable User Stories R Spec BddAslak Hellesoy Executable User Stories R Spec Bdd
Aslak Hellesoy Executable User Stories R Spec Bdddeimos
 
Venkat Subramaniam Building DSLs In Groovy
Venkat Subramaniam Building DSLs In GroovyVenkat Subramaniam Building DSLs In Groovy
Venkat Subramaniam Building DSLs In Groovydeimos
 
Venkat Subramaniam Blending Java With Dynamic Languages
Venkat Subramaniam Blending Java With Dynamic LanguagesVenkat Subramaniam Blending Java With Dynamic Languages
Venkat Subramaniam Blending Java With Dynamic Languagesdeimos
 
Tim Mackinnon Agile And Beyond
Tim Mackinnon Agile And BeyondTim Mackinnon Agile And Beyond
Tim Mackinnon Agile And Beyonddeimos
 
Steve Vinoski Rest And Reuse And Serendipity
Steve Vinoski Rest And Reuse And SerendipitySteve Vinoski Rest And Reuse And Serendipity
Steve Vinoski Rest And Reuse And Serendipitydeimos
 
Stefan Tilkov Soa Rest And The Web
Stefan Tilkov Soa Rest And The WebStefan Tilkov Soa Rest And The Web
Stefan Tilkov Soa Rest And The Webdeimos
 
Stefan Tilkov Pragmatic Intro To Rest
Stefan Tilkov Pragmatic Intro To RestStefan Tilkov Pragmatic Intro To Rest
Stefan Tilkov Pragmatic Intro To Restdeimos
 
Rod Johnson Cathedral
Rod Johnson CathedralRod Johnson Cathedral
Rod Johnson Cathedraldeimos
 
Mike Stolz Dramatic Scalability
Mike Stolz Dramatic ScalabilityMike Stolz Dramatic Scalability
Mike Stolz Dramatic Scalabilitydeimos
 
Matt Youill Betfair
Matt Youill BetfairMatt Youill Betfair
Matt Youill Betfairdeimos
 
Pete Goodliffe A Tale Of Two Systems
Pete Goodliffe A Tale Of Two SystemsPete Goodliffe A Tale Of Two Systems
Pete Goodliffe A Tale Of Two Systemsdeimos
 
Ola Bini Evolving The Java Platform
Ola Bini Evolving The Java PlatformOla Bini Evolving The Java Platform
Ola Bini Evolving The Java Platformdeimos
 
Neal Gafter Java Evolution
Neal Gafter Java EvolutionNeal Gafter Java Evolution
Neal Gafter Java Evolutiondeimos
 
Markus Voelter Textual DSLs
Markus Voelter Textual DSLsMarkus Voelter Textual DSLs
Markus Voelter Textual DSLsdeimos
 
Marc Evers People Vs Process Beyond Agile
Marc Evers People Vs Process Beyond AgileMarc Evers People Vs Process Beyond Agile
Marc Evers People Vs Process Beyond Agiledeimos
 

Plus de deimos (20)

Aspect Orientated Programming in Ruby
Aspect Orientated Programming in RubyAspect Orientated Programming in Ruby
Aspect Orientated Programming in Ruby
 
Randy Shoup eBays Architectural Principles
Randy Shoup eBays Architectural PrinciplesRandy Shoup eBays Architectural Principles
Randy Shoup eBays Architectural Principles
 
Remy Sharp The DOM scripting toolkit jQuery
Remy Sharp The DOM scripting toolkit jQueryRemy Sharp The DOM scripting toolkit jQuery
Remy Sharp The DOM scripting toolkit jQuery
 
Ola Bini J Ruby Power On The Jvm
Ola Bini J Ruby Power On The JvmOla Bini J Ruby Power On The Jvm
Ola Bini J Ruby Power On The Jvm
 
Joe Walker Interactivewebsites Cometand Dwr
Joe Walker Interactivewebsites Cometand DwrJoe Walker Interactivewebsites Cometand Dwr
Joe Walker Interactivewebsites Cometand Dwr
 
Aslak Hellesoy Executable User Stories R Spec Bdd
Aslak Hellesoy Executable User Stories R Spec BddAslak Hellesoy Executable User Stories R Spec Bdd
Aslak Hellesoy Executable User Stories R Spec Bdd
 
Venkat Subramaniam Building DSLs In Groovy
Venkat Subramaniam Building DSLs In GroovyVenkat Subramaniam Building DSLs In Groovy
Venkat Subramaniam Building DSLs In Groovy
 
Venkat Subramaniam Blending Java With Dynamic Languages
Venkat Subramaniam Blending Java With Dynamic LanguagesVenkat Subramaniam Blending Java With Dynamic Languages
Venkat Subramaniam Blending Java With Dynamic Languages
 
Tim Mackinnon Agile And Beyond
Tim Mackinnon Agile And BeyondTim Mackinnon Agile And Beyond
Tim Mackinnon Agile And Beyond
 
Steve Vinoski Rest And Reuse And Serendipity
Steve Vinoski Rest And Reuse And SerendipitySteve Vinoski Rest And Reuse And Serendipity
Steve Vinoski Rest And Reuse And Serendipity
 
Stefan Tilkov Soa Rest And The Web
Stefan Tilkov Soa Rest And The WebStefan Tilkov Soa Rest And The Web
Stefan Tilkov Soa Rest And The Web
 
Stefan Tilkov Pragmatic Intro To Rest
Stefan Tilkov Pragmatic Intro To RestStefan Tilkov Pragmatic Intro To Rest
Stefan Tilkov Pragmatic Intro To Rest
 
Rod Johnson Cathedral
Rod Johnson CathedralRod Johnson Cathedral
Rod Johnson Cathedral
 
Mike Stolz Dramatic Scalability
Mike Stolz Dramatic ScalabilityMike Stolz Dramatic Scalability
Mike Stolz Dramatic Scalability
 
Matt Youill Betfair
Matt Youill BetfairMatt Youill Betfair
Matt Youill Betfair
 
Pete Goodliffe A Tale Of Two Systems
Pete Goodliffe A Tale Of Two SystemsPete Goodliffe A Tale Of Two Systems
Pete Goodliffe A Tale Of Two Systems
 
Ola Bini Evolving The Java Platform
Ola Bini Evolving The Java PlatformOla Bini Evolving The Java Platform
Ola Bini Evolving The Java Platform
 
Neal Gafter Java Evolution
Neal Gafter Java EvolutionNeal Gafter Java Evolution
Neal Gafter Java Evolution
 
Markus Voelter Textual DSLs
Markus Voelter Textual DSLsMarkus Voelter Textual DSLs
Markus Voelter Textual DSLs
 
Marc Evers People Vs Process Beyond Agile
Marc Evers People Vs Process Beyond AgileMarc Evers People Vs Process Beyond Agile
Marc Evers People Vs Process Beyond Agile
 

Dernier

Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
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
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
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
 
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
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
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
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
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
 
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
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 

Dernier (20)

Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
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
 
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
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
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
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
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
 
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
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 

Felipe Rodrigues Ddd The Way Back To Oo

  • 1. DDD Domain Driven Design - The way back to OO! Felipe Rodrigues de Almeida DDD blog.fratech.net 1
  • 2. ToPiCS The Problem Where are we missing the way? 3 The CoNCePT What is DDD about? 4 Why use DDD? 6 Where are we missing the way? (Fixes) 8 Layered Architecture 14 The way baCk Domain Objects 19 Entities, Services, Value Objects and Modules 21 Objects Life-Cycle 26 The meaNiNg Meaning What? 30 Ubiquitous Language 31 Supple Design 32 Strategic Design 34 DDD blog.fratech.net 2
  • 3. The Problem where are we missing the way? • What is important? What is urgent? • Domain Models vs Manager Models (MOP) • Bad Communication • Architects thinking only about infra-structure • We have lost real Object Orientation DDD blog.fratech.net 3
  • 4. The CoNCePT what is DDD about? Domain means “a sphere of knowledge, influency and activity “ of a situation So, Domain Driven Design means, design (a software) driven (oriented) by it knowledge, influency and activity DDD blog.fratech.net 4
  • 5. The CoNCePT what is DDD about? Above all, DDD is about to take the domain (a sphere of knowledge, influency and activity) and represent it in objects DDD is the way back to OO!!! DDD blog.fratech.net 5
  • 6. The CoNCePT why to use DDD? More than just a concept, DDD is a process to find out how to build a system and also to define how to treat specific business issues DDD blog.fratech.net 6
  • 7. The CoNCePT why to use DDD? Using DDD as a process you will be able to: • really use all those things your teacher said you could when you were learning OO • avoid the Manager(Service) Model (MOP), which requires knowledge about a specific implementation This kind o design is composed only by services • improve the comunication between your team and the customer DDD blog.fratech.net 7
  • 8. The CoNCePT where are we missing the way? (Fixes) • What is important? What is urgent? The business is important and the customer too Let`s give some attention to business and customer comunication! Important aspects cannot be left behind. DDD blog.fratech.net 8
  • 9. The CoNCePT where are we missing the way? (Fixes) • Domain Models vs Manager Models(services) MOP Domain Models treat the business like objects, services and compositions, concerned about the way things are connected in the real world Developing software is not about creating makers. DDD blog.fratech.net 9
  • 10. The CoNCePT where are we missing the way? (Fixes) • Bad Comunication The words you use when you are trying to explain a situation to your customer, who doesn’t know the system, are responsible for misunderstanding Talking with him using his business terms, will make for better communication Use the customers words to communicate! DDD blog.fratech.net 10
  • 11. The CoNCePT where are we missing the way? (Fixes) • Architects thinking only about infra-structure Architects are “freak“ people that usually think about technical stuff and forget what is important to the customer We have to think about business too. Using DDD design will focus on business situations The internal transfer of knowledge is easier since communication will be improved as well DDD blog.fratech.net 11
  • 12. The CoNCePT where are we missing the way? (Fixes) • We have lost real Object Orientation Object orientation is about the use of objects and their interactions to design software At design time, we have to find objects from the real world, to use for the specific case. Each domain model is singular and is not applicable to another model. DDD blog.fratech.net 12
  • 13. The meaNiNg wait a minute! You said: “Each domain model is singular and is not applicable to another model.” If I am in an enterprise, why should I have more than 1 model to describe a single “thing”, perhaps even more that 1 model per application As a proponent of DRY, this doesn’t make sense to me DDD blog.fratech.net 13
  • 14. The CoNCePT layered architecture A layered architecture at heart, is a way to separate concerns Domain model depends on some infrastructure, but not on a specific impementation. DDD blog.fratech.net 14
  • 15. The CoNCePT Presentation layer Responsible for interacting with the user, getting information from the user and showing information to the user The presentation layer usually depends on the application layer or Data Source Layer! DDD blog.fratech.net 15
  • 16. The CoNCePT application layer Works as delivery, coordinating tasks which the system is responsible for doing This layer has no business rules and is only responsible for delegating work to domain objects Its objects do not have state to reflect business situation, but can have state of a task’ s progress Consists of a set of decorators, delegating calls to domain layer. DDD blog.fratech.net 16
  • 17. The CoNCePT Data Source layer A set of generic technical capabilities, providing support for higher layers Here goes the most technical things! DDD blog.fratech.net 17
  • 18. The CoNCePT Domain layer Represents the concepts of business information and business situation A set of generic technical capabilities, providing support for higher layers This layer is the heart of business software! DDD blog.fratech.net 18
  • 19. The way baCk Domain objects Domain Objects are instances of real entities which hold any knowledgenemt, influency or activity of a situation We can figure out which domain objects we need, by talking to domain experts Focusing on key words will help to define domain objects. DDD blog.fratech.net 19
  • 20. The way baCk Domain objects DDD blog.fratech.net 20
  • 21. The way baCk entities Any object which has an identity Usually is mapped to real world objects Unique set of data. DDD blog.fratech.net 21
  • 22. The way baCk Value objects Used to describe characteristic of things It is part of the domain as much as entities, but is always under some model element, since it has no identity Set of data without identity. DDD blog.fratech.net 22
  • 23. The way baCk Services Services are a standalone interface, which holds operations that don’t fit in any object in the model It is not a thing, but a set of operations. DDD blog.fratech.net 23
  • 24. The meaNiNg wait a minute! You’ve said earlier that DDD is better than service/manager models, but here you’re saying that DDD uses services Make sure that you describe how this type of service is different from the other DDD blog.fratech.net 24
  • 25. The way baCk modules Organize your domain objects by modules, then whenever you need anything you know where it is Don’t drive your modules by infrastrucure. DDD blog.fratech.net 25
  • 26. The way baCk objects life Cycle Once you have decided the main objects of your system, you then know about its life cyle How will it interact in the model? Who is able to use it? Aggregate, Factory and Repository patterns stand for objects life cycle The point is avoid showing internal complexity to the client. DDD blog.fratech.net 26
  • 27. The way baCk aggregates A set of objects with a unique interface for external calls Indicated for cases where you need keep consistent a set of objects Aggregates always have a root responsible for being the interface for others elements. DDD blog.fratech.net 27
  • 28. The way baCk Factories Responsible for creation of domain objects or even an entire aggregate Required only when creation becomes too complicated. DDD blog.fratech.net 28
  • 29. The way baCk repositories Works as a “repository“ for domain objects Provides a simple interface for complex persistence operations Can encapsulate several data sources for a object Make a repository whenever you find a type that needs global access. DDD blog.fratech.net 29
  • 30. The meaNiNg meaning what? All software has a meaning Modeling is about find the meaning of software Find the meaning, express it and you will have a great model. DDD blog.fratech.net 30
  • 31. The meaNiNg Ubiquitous language Created by the team, maintained by the team and for the team Ubiquitous Language has to be concerned about the business in question Works like a dictionary, composed by the terms taken from Domain Experts. DDD blog.fratech.net 31
  • 32. The meaNiNg Supple Design Created by the team, mainteined by the team and for the team Have to concern about the business in question A set of concepts to make a flexible design. DDD blog.fratech.net 32
  • 33. The meaNiNg Supple Design - Some Patterns x Intention-Revealing Interfaces x Standalone Classes x Conceptual Contours DDD blog.fratech.net 33
  • 34. The meaNiNg Strategic Design A set of good pratices to achieve a good Domain Model These patterns can works as a check list to improve the design quality If you want you can express these patterns as documents. DDD blog.fratech.net 34
  • 35. The meaNiNg Strategic Design DDD blog.fratech.net 35
  • 36. The meaNiNg Strategic Design DDD blog.fratech.net 36
  • 37. The meaNiNg Strategic Design DDD blog.fratech.net 37
  • 38. The meaNiNg Strategic Design DDD blog.fratech.net 38
  • 39. The meaNiNg Strategic Design DDD blog.fratech.net 39
  • 40. The meaNiNg Strategic Design DDD blog.fratech.net 40
  • 41. The meaNiNg Strategic Design DDD blog.fratech.net 41
  • 42. The meaNiNg Strategic Design DDD blog.fratech.net 42
  • 43. The meaNiNg wait a minute! Have you considered making a connection between “Published Language” and DSLs? I forgot about this aspect, but using DDD is a fantastic way to have an architecture that can transform into a DSL via this route DDD blog.fratech.net 43
  • 44. The meaNiNg Strategic Design DDD blog.fratech.net 44
  • 45. waiT a miNUTe! * The “Wait a minute!” questions are real questions from Ian Roughley after review this document. Thank you Ian! ** No, that man is not Ian. DDD blog.fratech.net 45
  • 46. The eND obrigado! Felipe Rodrigues de Almeida felipe@fratech net blog fratech net DDD blog.fratech.net 46