agile development and domain driven design

43
Jacopo Romei http://www.sviluppoagile.it/ Agile development and Domain Driven Design

Upload: jacopo-romei

Post on 08-May-2015

4.382 views

Category:

Technology


0 download

DESCRIPTION

Agile development is getting every year more popular around the world while a less known methodology is the Domain Driven Design (DDD) which defines a few rules to be followed to empower the agile team to raise communication effectiveness. Agile methods and DDD are perfectly matching and used together can solve many problems we are all too sadly used to.

TRANSCRIPT

Page 1: Agile development and domain driven design

Jacopo Romeihttp://www.sviluppoagile.it/

Agile development and Domain Driven Design

Page 2: Agile development and domain driven design

Jacopo Romei, http://www.sviluppoagile.it/

J

Ego sliding Jacopo Romei

PHP since 1999

IT CEO in the past

Freelance agile coach

http://www.sviluppoagile.it/

Page 3: Agile development and domain driven design

Jacopo Romei, http://www.sviluppoagile.it/

J

Agile development

A family of empirical methodologies

Page 4: Agile development and domain driven design

Jacopo Romei, http://www.sviluppoagile.it/

J

Agile Manifesto Individuals over tools

Working software over documentation

Customer collaboration over contract deals

Accept change over following plans

Page 5: Agile development and domain driven design

Jacopo Romei, http://www.sviluppoagile.it/

J

Domain

What does inspire our solutions?

Page 6: Agile development and domain driven design

Jacopo Romei, http://www.sviluppoagile.it/

J

Driven

Where do we find our solutions?

Page 7: Agile development and domain driven design

Jacopo Romei, http://www.sviluppoagile.it/

J

Design

What does provide us with solutions?

Page 8: Agile development and domain driven design

Jacopo Romei, http://www.sviluppoagile.it/

J

Design vs. Process Design principles

Messy reality

DDD is a way to cope with the mess

Agile Dev is a way to cope with the mess

Page 9: Agile development and domain driven design

Jacopo Romei, http://www.sviluppoagile.it/

J

Manouvrability

Agility means manouvrability

Page 10: Agile development and domain driven design

Jacopo Romei, http://www.sviluppoagile.it/

J

Shared values Courage

Respect

Page 11: Agile development and domain driven design

Jacopo Romei, http://www.sviluppoagile.it/

J

Shared values Courage

Respect

Simplicity

Simplicity is the art of maximizing the amount of work not done

Page 12: Agile development and domain driven design

Jacopo Romei, http://www.sviluppoagile.it/

J

Shared values Courage

Respect

Simplicity Communication Feedback

Page 13: Agile development and domain driven design

Jacopo Romei, http://www.sviluppoagile.it/

J

Shared values Courage

Respect

Simplicity Communication Feedback

Who

Which

How

Why

Page 14: Agile development and domain driven design

Jacopo Romei, http://www.sviluppoagile.it/

J

XP and good design Refactoring tries to avoid overengineering

Refactoring can develop underengineering

XP works best with good designers

DDD helps developers being good designers

Page 15: Agile development and domain driven design

Jacopo Romei, http://www.sviluppoagile.it/

J

Don't ossify, please

Supple, knowledge­rich design

Page 16: Agile development and domain driven design

Jacopo Romei, http://www.sviluppoagile.it/

J

Orthogonality•Orthogonality is a system design property facilitating feasibility and compactness of complex designs.

• Orthogonality guarantees that modifying the technical effect produced by a component of a system neither creates nor propagates side effects to other components of the system. 

•Emergent behavior of a system should be controlled strictly by formal definitions of its logic and not by side effects resulting from poor integratio

•Orthogonality reduces testing and development time

Page 17: Agile development and domain driven design

Jacopo Romei, http://www.sviluppoagile.it/

J

Shared required practices Iterative and incremental development

Close relationship with domain experts

Refactoring

Page 18: Agile development and domain driven design

Jacopo Romei, http://www.sviluppoagile.it/

J

UX & Agile

Methodology to write user stories

Page 19: Agile development and domain driven design

Jacopo Romei, http://www.sviluppoagile.it/

J

DDD & Agile

Methodology to (let emerge) design

Page 20: Agile development and domain driven design

Jacopo Romei, http://www.sviluppoagile.it/

J

Ubiquitous language

One jargon to rule them all

Page 21: Agile development and domain driven design

Jacopo Romei, http://www.sviluppoagile.it/

J

Ubiquitous language Model as backbone of language in

Code Diagrams Writings Speech

Page 22: Agile development and domain driven design

Jacopo Romei, http://www.sviluppoagile.it/

Ubiquitous language Refactor

Classes Methods Modules

Reflect Real world entities Confusion resolution in conversations Changes in language as changes in model

Page 23: Agile development and domain driven design

Jacopo Romei, http://www.sviluppoagile.it/

Example

Page 24: Agile development and domain driven design

Jacopo Romei, http://www.sviluppoagile.it/

J

Short example “If we give the Routing Service an origin, 

destination and arrival time, it can look up the stops the cargo will have to make and well... stick them in the database”

“The origin, destination and so on... it all feeds into Routing Service and we get back an Itinerary that has everything we need it”

“A Routing Service finds an Itinerary that satisfies a Route Specification”

Page 25: Agile development and domain driven design

Jacopo Romei, http://www.sviluppoagile.it/

J

Documentation

Agile methodologies value working software over comprehensive documentation

Page 26: Agile development and domain driven design

Jacopo Romei, http://www.sviluppoagile.it/

UML is not enoughUML doesn't convoy the concepts behind a model

UML doesn't convoy what objects are meant to do

Page 27: Agile development and domain driven design

Jacopo Romei, http://www.sviluppoagile.it/

Ubiquitous documentationUML provides some documentation

Code provides some documentation

Ubiquitous language provides some documentation

Page 28: Agile development and domain driven design

Jacopo Romei, http://www.sviluppoagile.it/

J

Hands-on modelers

Everyone who writes code must feel responsible for the model.

Page 29: Agile development and domain driven design

Jacopo Romei, http://www.sviluppoagile.it/

J

Hands-on modelers

Everyone who writes code must feel responsible for the model.

Everyone contributing to the model must touch the code.

Page 30: Agile development and domain driven design

Jacopo Romei, http://www.sviluppoagile.it/

J

Hands-on modelers

Everyone who writes code must feel responsible for the model.

Everyone contributing to the model must touch the code.

 That's a DDD team. That's an agile team.

Page 31: Agile development and domain driven design

Jacopo Romei, http://www.sviluppoagile.it/

J

Modeling paradigm

Object oriented programming is good to model the way we think about things. OO community 

developed lots of critically meaningful concepts.

PHP community: WAKE UP!

Page 32: Agile development and domain driven design

Jacopo Romei, http://www.sviluppoagile.it/

J

Deadly divide Model can be absent (brrr...)

Model can be overdesigned

Model can be detached from the domain

Suspect correctness

Hard to maintain

Difficult to understand

Page 33: Agile development and domain driven design

Jacopo Romei, http://www.sviluppoagile.it/

J

Reflection

Software must reflect domain model

Page 34: Agile development and domain driven design

Jacopo Romei, http://www.sviluppoagile.it/

J

Ubiquity

Software must reflect ubiquitous language

Page 35: Agile development and domain driven design

Jacopo Romei, http://www.sviluppoagile.it/

J

Building blocks Layered architecture

Services

Entities

Value Objects

Factories

Aggregates

Repositories

Page 36: Agile development and domain driven design

Jacopo Romei, http://www.sviluppoagile.it/

J

Layers User interface

Smart UI vs. Model Driven Design

Page 37: Agile development and domain driven design

Jacopo Romei, http://www.sviluppoagile.it/

J

Layers User interface

Smart UI vs. Model Driven Design

Application

a.k.a. Controller

Page 38: Agile development and domain driven design

Jacopo Romei, http://www.sviluppoagile.it/

J

Layers User interface

Smart UI vs. Model Driven Design

Application

a.k.a. Controller

Domain/Model layer

Page 39: Agile development and domain driven design

Jacopo Romei, http://www.sviluppoagile.it/

J

Layers User interface

Smart UI vs. Model Driven Design

Application

a.k.a. Controller

Domain/Model layer Infrastructure

Page 40: Agile development and domain driven design

Jacopo Romei, http://www.sviluppoagile.it/

J

Frameworks

Free choice, but domain layer must be preserved.

Page 41: Agile development and domain driven design

Jacopo Romei, http://www.sviluppoagile.it/

J

The end, the beginning

No one said agile was easy.

No one said it was a standalone concept.

Page 42: Agile development and domain driven design

Jacopo Romei, http://www.sviluppoagile.it/

J

What's next

Agile Day 2009

Page 43: Agile development and domain driven design

Jacopo Romei, http://www.sviluppoagile.it/

J

Jacopo Romei

jacopo [at] sviluppoagile.it

skype: jacoporomei

www.sviluppoagile.it