Domaine Driven Design - Bordeaux IO
-
Upload
xebia-france -
Category
Software
-
view
354 -
download
2
description
Transcript of Domaine Driven Design - Bordeaux IO
Domain Driven DesignGérôme Egron !Nicolas Jozwiak
Programmeur et agiliste!!@njozwiak
Programmeur et agiliste!!@njozwiak
Xebia consultant since 2012.!!
@geromeegron
SOMMAIRE• Domain Driven Design!!• Les principaux concepts!!• Architecture hexagonale!!• Hands On!
Domain Driven Design
REFERENCES
DOMAIN
• Core business of the company!!• Represents a sphere of knowledge!!• Create best software by concentrating on the
problems related to the domain!
DOMAIN
• Not focus on technologies!!• Ubiquitous language !! structured language around the domain model and used by all team members
MODEL DRIVEN DESIGN
• Represents the domain model in terms of software!!• Code modification means changing model!!• Model is adapted to a usage, a context
PATTERNS
ENTITIES
• entity = identity + state!!• long lifecycle!• has to have an operational way of applying identity!• Identity has to be guaranted unique within the system
ENTITIES
• The object state is the sum of its data values which define it at a precise moment in time!
!• Different stable state which occurs with transformations!!• Mutable and immutable attributes!
VALUE OBJECTS
• No conceptual identity!!• Immutable!!• Focus of their domain!!• Reflect constraints!
VALUE OBJECTS
• Help to define the state of other entities objects!!• Construction has to be meaningful and well formed
VALUE OBJECTS
void addCustomer(String, String)
void addCustomer(Name, PhoneNumber)
• Make implicit concepts explicit
AGGREGATES
• Treats domain objects as a single unit!!• Operations have to interfer with root!!• Ensure integrity of the whole!
SERVICES
• When a significant process or transformation in the domain is not a responsibility of an entity or value object!!• Define an interface in terms of language of the model!!• Have to be stateless!
SERVICE TYPES
• Domain service!!• Infrastructure service!!• Application service
REPOSITORIES
• Mediator between data access and domain layer!!• Root entity
BOUNDED CONTEXT
• Model has a limit!!• Communication with others domains!!• anticorruption layer!• conformist!• shared kernel!• customer/supplier relationship!• separate ways!• open host
ARCHITECTURE HEXAGONALE
Port and Adapter
Alistair Cockburn
Port / Adapter
Domain
X
Port / Adapter
Interface
Repository / Mock
Port / Adapter
Domain
Rest Adapter
Rest Port
Queue Adapter
Queue Port
Port / Adapter
https://github.com/xebia-france/workshop-ddd