SlideShare a Scribd company logo
The Importance of Being Driven Antonio Terreno 2nd European Summer School on Agile Programming 28 June 2007, Varese
Software design is art “ Software design is an art, and like any art it cannot be taught and learned as a precise science, by means of theorems and formulas.” Floyd Marinescu
What drives you? To finish the story?  Money? Technology? Design / Good code? Arrive at 6.00 PM safe? Career? Doh, nothing!
The Agile Way No upfront design, requirement gathering The team makes the design Participation with the stakeholder Simple, what is simple for you? What is good for you? Refactoring, refactoring how? (dev skills) Refactoring how much? (fear)
Test driven Do I have still to talk about this? I know you don’t like it It makes design more complicated 1 hour to write the test, 10 seconds for the code Do I really have to write all those tests? It’s simple, I can do it without a test, c’mon! I’ve done this millions of times Why not testing after? We can have a lot of testers and they are cheaper
Behavior Driven Development Dan North, Dave Astels It’s not about testing, it’s about behavior It’s about writing specifications It’s about writing how the code works It’s about understanding how the system works It’s about understanding what I have to write Unit? Unit what? The 1-1 problem Test method names should be sentences
BDD The given when then template Ubiquitous language, BA, DEV, QA Given When Then
BDD Tools Tools JBehave NBehave RBehave rSpec You can write BDD also using the old stuff, don’t worry  Code example
Domain Driven Development Focus on the domain A common language Layered architecture Entities / Value Objects Services Modules Aggregates Factories Repositories
Domain Driven Layered architecture User interface Application Layer No business logic No State of business objects Holds state of an application task progress Domain Layer Info about the domain State is held here Infrastructure Layer Communication between layers Persistence for business objects Support libraries
Why layers? Manage changes Avoids coupling of code Avoids unexpected behaviors after changes
Entities Objects that have an identity Spanning the life of the system and even after a Person object for example The Id does never change Some domain objects have already the concept of id  National number, airport code, … All the domain objects are then entities?
Value Objects When we care about what an object  has  and not about which object  is How and when write a VO? First we write a VO when the object is NOT an Entity! Will be great if a VO is immutable For performance but mostly They will manifest integrity If value objects are sharable they should be immutable Keep VO thin and simple Please no huge VO, a VO can contain value objects and reference to Entities
Services In the ubiquitous language the objects are  the nouns, the services are the verbs.  A service provides functionality for the domain I can’t really put this stuff on an object! A service performs an operation The operation refers to a domain concept The operations refers to other object in the domain model The operation is stateless Keeps the domain isolated
Modules In a complex system the model grows Let’s split it in to modules, in order to reduce complexity High level of cohesion, low level of coupling  Communicational cohesion Parts of the module work with same data Functional cohesion Parts of the module work together to perform well-defined tasks
Aggregates Relations between objects One to many, many to many, complexity! First, try to remove and refactor when you don’t need it Try to reduce multiplicity and direction (bi to mono) Cascade on update/delete, usually the db does this for us Typically then what happen? Poor performances! Use aggregate An aggregate has an entity as root element Only the root is obtainable through queries The Entity is responsible of maintaining the invariants
Factories When creating an objects instance is complex When creating an object (especially an Aggregate) is a responsibility Use factories. I create the root of the Aggregate and all the contained object Atomic creation Factories violates objects encapsulation, be careful! Use a constructor when: It’s simple All the attributes can be passed via the constructor The class is the type, there’s no need to choose different implementation
Repositories We don’t want to be coupled to the DB/persistence infrastructure A repository encapsulate the logic in order to obtain object references It may include a Strategy It should be simple (find, add for example) A factory creates, a repository retrieves.  A factory is pure domain, a repository communicates with the infrastructure
Refactoring Don’t only write code, read it! Refactoring is redesign code without changing the behavior Do refactor when you have test coverage!  Refactoring patterns Or refactor the domain itself ( can’t use pattern here) Use the verbs nouns metaphor Talk with the team Think! What the code does and why should be readable Refactoring has domain motivations not only technical ones. Including domain experts may help a lot.
All together .
Domain Specific Languages Small, Domain focused language  Domain experts themselves can understand, validate, modify, and often even develop DSL programs Do I really need a new language?  Fluent interfaces Code Example
Dev/BA Dev pair sessions with BA Domain Experts Code that “even” a BA can read and change
Delivery Driven Focus on the delivery Focus on the after delivery Design Readability of the code Layering Tools  Continuous Integration Techniques Time boxing Story Prioritization Pairing

More Related Content

What's hot

Keynote: What’s new in Sirius?
Keynote: What’s new in Sirius?Keynote: What’s new in Sirius?
Keynote: What’s new in Sirius?
Obeo
 
[ Capella Day 2019 ] Augmenting requirements with models to improve the artic...
[ Capella Day 2019 ] Augmenting requirements with models to improve the artic...[ Capella Day 2019 ] Augmenting requirements with models to improve the artic...
[ Capella Day 2019 ] Augmenting requirements with models to improve the artic...
Obeo
 
.NET Architecture for Enterprises
.NET Architecture for Enterprises.NET Architecture for Enterprises
.NET Architecture for Enterprises
Wade Wegner
 
Multi Team Architecture
Multi Team ArchitectureMulti Team Architecture
Multi Team Architecture
Sigma Software
 
Software Architecture: Principles, Patterns and Practices
Software Architecture: Principles, Patterns and PracticesSoftware Architecture: Principles, Patterns and Practices
Software Architecture: Principles, Patterns and Practices
Ganesh Samarthyam
 
Clean architecture with ddd layering in php
Clean architecture with ddd layering in phpClean architecture with ddd layering in php
Clean architecture with ddd layering in php
Leonardo Proietti
 
Domain Driven Design for Angular
Domain Driven Design for AngularDomain Driven Design for Angular
Domain Driven Design for Angular
Jennifer Estrada
 
AppliFire Blue Print Design Guidelines
AppliFire Blue Print Design GuidelinesAppliFire Blue Print Design Guidelines
AppliFire Blue Print Design Guidelines
AppliFire Platform
 
Crafted Design - Sandro Mancuso
Crafted Design - Sandro MancusoCrafted Design - Sandro Mancuso
Crafted Design - Sandro Mancuso
JAXLondon2014
 
Clean coding in plsql and sql
Clean coding in plsql and sqlClean coding in plsql and sql
Clean coding in plsql and sql
Brendan Furey
 
Domain-Driven Design with ASP.NET MVC
Domain-Driven Design with ASP.NET MVCDomain-Driven Design with ASP.NET MVC
Domain-Driven Design with ASP.NET MVC
Steven Smith
 
Dive into POOSL : Simulate your systems!
Dive into POOSL : Simulate your systems!Dive into POOSL : Simulate your systems!
Dive into POOSL : Simulate your systems!
Obeo
 
Keynote: A Roadmap for Domain-Specific Low-Code Platforms
Keynote: A Roadmap for Domain-Specific Low-Code PlatformsKeynote: A Roadmap for Domain-Specific Low-Code Platforms
Keynote: A Roadmap for Domain-Specific Low-Code Platforms
Obeo
 
The Magic Of Application Lifecycle Management In Vs Public
The Magic Of Application Lifecycle Management In Vs PublicThe Magic Of Application Lifecycle Management In Vs Public
The Magic Of Application Lifecycle Management In Vs Public
David Solivan
 
Software Architecture
Software ArchitectureSoftware Architecture
Software Architecture
Dharmalingam Ganesan
 
[Siriuscon2018] Integrating Sirius, Xtext and EMF Compare to Design Simulato...
[Siriuscon2018]  Integrating Sirius, Xtext and EMF Compare to Design Simulato...[Siriuscon2018]  Integrating Sirius, Xtext and EMF Compare to Design Simulato...
[Siriuscon2018] Integrating Sirius, Xtext and EMF Compare to Design Simulato...
Obeo
 
How to Use Innoslate for Advanced Users
How to Use Innoslate for Advanced UsersHow to Use Innoslate for Advanced Users
How to Use Innoslate for Advanced Users
Elizabeth Steiner
 
Refactoring for Software Architecture Smells
Refactoring for Software Architecture SmellsRefactoring for Software Architecture Smells
Refactoring for Software Architecture Smells
Ganesh Samarthyam
 
Are You an Accidental or Intention Software Architect
Are You an Accidental or Intention Software ArchitectAre You an Accidental or Intention Software Architect
Are You an Accidental or Intention Software Architect
Randy Ynchausti
 
Resources slides
Resources slidesResources slides
Resources slides
IBM Rational software
 

What's hot (20)

Keynote: What’s new in Sirius?
Keynote: What’s new in Sirius?Keynote: What’s new in Sirius?
Keynote: What’s new in Sirius?
 
[ Capella Day 2019 ] Augmenting requirements with models to improve the artic...
[ Capella Day 2019 ] Augmenting requirements with models to improve the artic...[ Capella Day 2019 ] Augmenting requirements with models to improve the artic...
[ Capella Day 2019 ] Augmenting requirements with models to improve the artic...
 
.NET Architecture for Enterprises
.NET Architecture for Enterprises.NET Architecture for Enterprises
.NET Architecture for Enterprises
 
Multi Team Architecture
Multi Team ArchitectureMulti Team Architecture
Multi Team Architecture
 
Software Architecture: Principles, Patterns and Practices
Software Architecture: Principles, Patterns and PracticesSoftware Architecture: Principles, Patterns and Practices
Software Architecture: Principles, Patterns and Practices
 
Clean architecture with ddd layering in php
Clean architecture with ddd layering in phpClean architecture with ddd layering in php
Clean architecture with ddd layering in php
 
Domain Driven Design for Angular
Domain Driven Design for AngularDomain Driven Design for Angular
Domain Driven Design for Angular
 
AppliFire Blue Print Design Guidelines
AppliFire Blue Print Design GuidelinesAppliFire Blue Print Design Guidelines
AppliFire Blue Print Design Guidelines
 
Crafted Design - Sandro Mancuso
Crafted Design - Sandro MancusoCrafted Design - Sandro Mancuso
Crafted Design - Sandro Mancuso
 
Clean coding in plsql and sql
Clean coding in plsql and sqlClean coding in plsql and sql
Clean coding in plsql and sql
 
Domain-Driven Design with ASP.NET MVC
Domain-Driven Design with ASP.NET MVCDomain-Driven Design with ASP.NET MVC
Domain-Driven Design with ASP.NET MVC
 
Dive into POOSL : Simulate your systems!
Dive into POOSL : Simulate your systems!Dive into POOSL : Simulate your systems!
Dive into POOSL : Simulate your systems!
 
Keynote: A Roadmap for Domain-Specific Low-Code Platforms
Keynote: A Roadmap for Domain-Specific Low-Code PlatformsKeynote: A Roadmap for Domain-Specific Low-Code Platforms
Keynote: A Roadmap for Domain-Specific Low-Code Platforms
 
The Magic Of Application Lifecycle Management In Vs Public
The Magic Of Application Lifecycle Management In Vs PublicThe Magic Of Application Lifecycle Management In Vs Public
The Magic Of Application Lifecycle Management In Vs Public
 
Software Architecture
Software ArchitectureSoftware Architecture
Software Architecture
 
[Siriuscon2018] Integrating Sirius, Xtext and EMF Compare to Design Simulato...
[Siriuscon2018]  Integrating Sirius, Xtext and EMF Compare to Design Simulato...[Siriuscon2018]  Integrating Sirius, Xtext and EMF Compare to Design Simulato...
[Siriuscon2018] Integrating Sirius, Xtext and EMF Compare to Design Simulato...
 
How to Use Innoslate for Advanced Users
How to Use Innoslate for Advanced UsersHow to Use Innoslate for Advanced Users
How to Use Innoslate for Advanced Users
 
Refactoring for Software Architecture Smells
Refactoring for Software Architecture SmellsRefactoring for Software Architecture Smells
Refactoring for Software Architecture Smells
 
Are You an Accidental or Intention Software Architect
Are You an Accidental or Intention Software ArchitectAre You an Accidental or Intention Software Architect
Are You an Accidental or Intention Software Architect
 
Resources slides
Resources slidesResources slides
Resources slides
 

Viewers also liked

Marek
MarekMarek
Stories in a digital world
Stories in a digital worldStories in a digital world
Stories in a digital world
Jonathan Waddingham
 
Icon in iphone itouch
Icon in iphone itouchIcon in iphone itouch
Icon in iphone itouch
Kwan Tuck Soon
 
DataWikiを実現するWedataの構築と運用
DataWikiを実現するWedataの構築と運用DataWikiを実現するWedataの構築と運用
DataWikiを実現するWedataの構築と運用
Koichiro Eto
 
Practical aspects of using Microsoft technologes in Belgorod Information Fund
Practical aspects of using Microsoft technologes in Belgorod Information FundPractical aspects of using Microsoft technologes in Belgorod Information Fund
Practical aspects of using Microsoft technologes in Belgorod Information Fund
Exey Panteleev
 
The Medialisation of Sight
The Medialisation of SightThe Medialisation of Sight
The Medialisation of Sight
Benjamin Jörissen
 
Festa Dei Sozzi
Festa Dei SozziFesta Dei Sozzi
Festa Dei Sozzi
aldamith
 
Mobile learning in formal education or: How to train a trojan horse
Mobile learning in formal education or: How to train a trojan horseMobile learning in formal education or: How to train a trojan horse
Mobile learning in formal education or: How to train a trojan horse
Benjamin Jörissen
 
IDF2013大会分享——《使用新浪移动云开发全平台应用》
IDF2013大会分享——《使用新浪移动云开发全平台应用》IDF2013大会分享——《使用新浪移动云开发全平台应用》
IDF2013大会分享——《使用新浪移动云开发全平台应用》
easychen
 
Own Your Apps
Own Your Apps Own Your Apps
Own Your Apps
Ivo Jansch
 
μια καλη φιλια
μια καλη φιλιαμια καλη φιλια
μια καλη φιλια
gerasimos
 
我是产品经理我需不需要学技术
我是产品经理我需不需要学技术我是产品经理我需不需要学技术
我是产品经理我需不需要学技术
easychen
 
SL for begginers 6
SL for begginers 6SL for begginers 6
SL for begginers 6
ccosmato
 
新浪云平台的经验和教训
新浪云平台的经验和教训新浪云平台的经验和教训
新浪云平台的经验和教训
easychen
 
Información científica
Información científicaInformación científica
Información científica
mjordan
 
50 anni mamma
50 anni mamma50 anni mamma
50 anni mamma
aldamith
 

Viewers also liked (20)

Marek
MarekMarek
Marek
 
Apuntes Para Lengua
Apuntes Para LenguaApuntes Para Lengua
Apuntes Para Lengua
 
Stories in a digital world
Stories in a digital worldStories in a digital world
Stories in a digital world
 
Icon in iphone itouch
Icon in iphone itouchIcon in iphone itouch
Icon in iphone itouch
 
DataWikiを実現するWedataの構築と運用
DataWikiを実現するWedataの構築と運用DataWikiを実現するWedataの構築と運用
DataWikiを実現するWedataの構築と運用
 
Practical aspects of using Microsoft technologes in Belgorod Information Fund
Practical aspects of using Microsoft technologes in Belgorod Information FundPractical aspects of using Microsoft technologes in Belgorod Information Fund
Practical aspects of using Microsoft technologes in Belgorod Information Fund
 
4 piliere mojho duchovneho rastu
4 piliere mojho duchovneho rastu4 piliere mojho duchovneho rastu
4 piliere mojho duchovneho rastu
 
Judska Pust
Judska PustJudska Pust
Judska Pust
 
The Medialisation of Sight
The Medialisation of SightThe Medialisation of Sight
The Medialisation of Sight
 
Festa Dei Sozzi
Festa Dei SozziFesta Dei Sozzi
Festa Dei Sozzi
 
Mobile learning in formal education or: How to train a trojan horse
Mobile learning in formal education or: How to train a trojan horseMobile learning in formal education or: How to train a trojan horse
Mobile learning in formal education or: How to train a trojan horse
 
IDF2013大会分享——《使用新浪移动云开发全平台应用》
IDF2013大会分享——《使用新浪移动云开发全平台应用》IDF2013大会分享——《使用新浪移动云开发全平台应用》
IDF2013大会分享——《使用新浪移动云开发全平台应用》
 
Own Your Apps
Own Your Apps Own Your Apps
Own Your Apps
 
μια καλη φιλια
μια καλη φιλιαμια καλη φιλια
μια καλη φιλια
 
我是产品经理我需不需要学技术
我是产品经理我需不需要学技术我是产品经理我需不需要学技术
我是产品经理我需不需要学技术
 
Spaziorientappt
SpaziorientapptSpaziorientappt
Spaziorientappt
 
SL for begginers 6
SL for begginers 6SL for begginers 6
SL for begginers 6
 
新浪云平台的经验和教训
新浪云平台的经验和教训新浪云平台的经验和教训
新浪云平台的经验和教训
 
Información científica
Información científicaInformación científica
Información científica
 
50 anni mamma
50 anni mamma50 anni mamma
50 anni mamma
 

Similar to Importance Of Being Driven

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
Rick van der Arend
 
Writing good C# code for good cloud applications - Draft Oct 20, 2014
Writing good C# code for good cloud applications - Draft Oct 20, 2014Writing good C# code for good cloud applications - Draft Oct 20, 2014
Writing good C# code for good cloud applications - Draft Oct 20, 2014
Marco Parenzan
 
Domain Driven Design(DDD) Presentation
Domain Driven Design(DDD) PresentationDomain Driven Design(DDD) Presentation
Domain Driven Design(DDD) Presentation
Oğuzhan Soykan
 
DDD In Agile
DDD In Agile   DDD In Agile
DDD In Agile
Skills Matter
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
Lalit Kale
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
Ryan Riley
 
Evolve Your Code
Evolve Your CodeEvolve Your Code
Evolve Your Code
RookieOne
 
Domain driven design
Domain driven designDomain driven design
Domain driven design
its_skm
 
Envisioning the Future of Language Workbenches
Envisioning the Future of Language WorkbenchesEnvisioning the Future of Language Workbenches
Envisioning the Future of Language Workbenches
Markus Voelter
 
Oops Concepts
Oops ConceptsOops Concepts
Oops Concepts
guest1aac43
 
How to Implement Domain Driven Design in Real Life SDLC
How to Implement Domain Driven Design  in Real Life SDLCHow to Implement Domain Driven Design  in Real Life SDLC
How to Implement Domain Driven Design in Real Life SDLC
Abdul Karim
 
Stream SQL eventflow visual programming for real programmers presentation
Stream SQL eventflow visual programming for real programmers presentationStream SQL eventflow visual programming for real programmers presentation
Stream SQL eventflow visual programming for real programmers presentation
streambase
 
DDD
DDDDDD
GoF Design patterns I: Introduction + Structural Patterns
GoF Design patterns I:   Introduction + Structural PatternsGoF Design patterns I:   Introduction + Structural Patterns
GoF Design patterns I: Introduction + Structural Patterns
Sameh Deabes
 
Bp301
Bp301Bp301
Introduction to object oriented language
Introduction to object oriented languageIntroduction to object oriented language
Introduction to object oriented language
farhan amjad
 
D2 domain driven-design
D2 domain driven-designD2 domain driven-design
D2 domain driven-design
Arnaud Bouchez
 
Build your own Language - Why and How?
Build your own Language - Why and How?Build your own Language - Why and How?
Build your own Language - Why and How?
Markus Voelter
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
Harsh Jegadeesan
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
yassin elhadedy
 

Similar to Importance Of Being Driven (20)

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
 
Writing good C# code for good cloud applications - Draft Oct 20, 2014
Writing good C# code for good cloud applications - Draft Oct 20, 2014Writing good C# code for good cloud applications - Draft Oct 20, 2014
Writing good C# code for good cloud applications - Draft Oct 20, 2014
 
Domain Driven Design(DDD) Presentation
Domain Driven Design(DDD) PresentationDomain Driven Design(DDD) Presentation
Domain Driven Design(DDD) Presentation
 
DDD In Agile
DDD In Agile   DDD In Agile
DDD In Agile
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
Evolve Your Code
Evolve Your CodeEvolve Your Code
Evolve Your Code
 
Domain driven design
Domain driven designDomain driven design
Domain driven design
 
Envisioning the Future of Language Workbenches
Envisioning the Future of Language WorkbenchesEnvisioning the Future of Language Workbenches
Envisioning the Future of Language Workbenches
 
Oops Concepts
Oops ConceptsOops Concepts
Oops Concepts
 
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
 
Stream SQL eventflow visual programming for real programmers presentation
Stream SQL eventflow visual programming for real programmers presentationStream SQL eventflow visual programming for real programmers presentation
Stream SQL eventflow visual programming for real programmers presentation
 
DDD
DDDDDD
DDD
 
GoF Design patterns I: Introduction + Structural Patterns
GoF Design patterns I:   Introduction + Structural PatternsGoF Design patterns I:   Introduction + Structural Patterns
GoF Design patterns I: Introduction + Structural Patterns
 
Bp301
Bp301Bp301
Bp301
 
Introduction to object oriented language
Introduction to object oriented languageIntroduction to object oriented language
Introduction to object oriented language
 
D2 domain driven-design
D2 domain driven-designD2 domain driven-design
D2 domain driven-design
 
Build your own Language - Why and How?
Build your own Language - Why and How?Build your own Language - Why and How?
Build your own Language - Why and How?
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 

More from Antonio Terreno

Serverless conference-labrador-at-2018
Serverless conference-labrador-at-2018Serverless conference-labrador-at-2018
Serverless conference-labrador-at-2018
Antonio Terreno
 
Blend it up - leancamp london presentation
Blend it up - leancamp london presentationBlend it up - leancamp london presentation
Blend it up - leancamp london presentation
Antonio Terreno
 
Programmer Anarchy
Programmer AnarchyProgrammer Anarchy
Programmer Anarchy
Antonio Terreno
 
Socket.io
Socket.ioSocket.io
Socket.io
Antonio Terreno
 
Agiler without a schema @forward
Agiler without a schema @forwardAgiler without a schema @forward
Agiler without a schema @forward
Antonio Terreno
 
Mongo db
Mongo dbMongo db
Mongo db
Antonio Terreno
 
J2Me Il Micro Mondo Java
J2Me Il Micro Mondo JavaJ2Me Il Micro Mondo Java
J2Me Il Micro Mondo Java
Antonio Terreno
 
Domain Driven Design Javaday Roma2007
Domain Driven Design Javaday Roma2007Domain Driven Design Javaday Roma2007
Domain Driven Design Javaday Roma2007
Antonio Terreno
 
Jc06 Antonio Terreno Fluidtime
Jc06 Antonio Terreno FluidtimeJc06 Antonio Terreno Fluidtime
Jc06 Antonio Terreno Fluidtime
Antonio Terreno
 
Kommons
KommonsKommons
From Amber To Green in Four Weeks
From Amber To Green in Four WeeksFrom Amber To Green in Four Weeks
From Amber To Green in Four Weeks
Antonio Terreno
 
Time Boxing
Time BoxingTime Boxing
Time Boxing
Antonio Terreno
 

More from Antonio Terreno (12)

Serverless conference-labrador-at-2018
Serverless conference-labrador-at-2018Serverless conference-labrador-at-2018
Serverless conference-labrador-at-2018
 
Blend it up - leancamp london presentation
Blend it up - leancamp london presentationBlend it up - leancamp london presentation
Blend it up - leancamp london presentation
 
Programmer Anarchy
Programmer AnarchyProgrammer Anarchy
Programmer Anarchy
 
Socket.io
Socket.ioSocket.io
Socket.io
 
Agiler without a schema @forward
Agiler without a schema @forwardAgiler without a schema @forward
Agiler without a schema @forward
 
Mongo db
Mongo dbMongo db
Mongo db
 
J2Me Il Micro Mondo Java
J2Me Il Micro Mondo JavaJ2Me Il Micro Mondo Java
J2Me Il Micro Mondo Java
 
Domain Driven Design Javaday Roma2007
Domain Driven Design Javaday Roma2007Domain Driven Design Javaday Roma2007
Domain Driven Design Javaday Roma2007
 
Jc06 Antonio Terreno Fluidtime
Jc06 Antonio Terreno FluidtimeJc06 Antonio Terreno Fluidtime
Jc06 Antonio Terreno Fluidtime
 
Kommons
KommonsKommons
Kommons
 
From Amber To Green in Four Weeks
From Amber To Green in Four WeeksFrom Amber To Green in Four Weeks
From Amber To Green in Four Weeks
 
Time Boxing
Time BoxingTime Boxing
Time Boxing
 

Recently uploaded

Overview of Enterprise-scale landing zones using Cloud Adoption Framework Rea...
Overview of Enterprise-scale landing zones using Cloud Adoption Framework Rea...Overview of Enterprise-scale landing zones using Cloud Adoption Framework Rea...
Overview of Enterprise-scale landing zones using Cloud Adoption Framework Rea...
MarceloMiranda38200
 
find out more about the role of autonomous vehicles in facing global challenges
find out more about the role of autonomous vehicles in facing global challengesfind out more about the role of autonomous vehicles in facing global challenges
find out more about the role of autonomous vehicles in facing global challenges
huseindihon
 
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
Toru Tamaki
 
How RPA Help in the Transportation and Logistics Industry.pptx
How RPA Help in the Transportation and Logistics Industry.pptxHow RPA Help in the Transportation and Logistics Industry.pptx
How RPA Help in the Transportation and Logistics Industry.pptx
SynapseIndia
 
Quantum Communications Q&A with Gemini LLM
Quantum Communications Q&A with Gemini LLMQuantum Communications Q&A with Gemini LLM
Quantum Communications Q&A with Gemini LLM
Vijayananda Mohire
 
Data Integration Basics: Merging & Joining Data
Data Integration Basics: Merging & Joining DataData Integration Basics: Merging & Joining Data
Data Integration Basics: Merging & Joining Data
Safe Software
 
Calgary MuleSoft Meetup APM and IDP .pptx
Calgary MuleSoft Meetup APM and IDP .pptxCalgary MuleSoft Meetup APM and IDP .pptx
Calgary MuleSoft Meetup APM and IDP .pptx
ishalveerrandhawa1
 
ARTIFICIAL INTELLIGENCE (AI) IN MUSIC.pdf
ARTIFICIAL INTELLIGENCE (AI) IN MUSIC.pdfARTIFICIAL INTELLIGENCE (AI) IN MUSIC.pdf
ARTIFICIAL INTELLIGENCE (AI) IN MUSIC.pdf
Inglês no Mundo Digital
 
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - MydbopsScaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Mydbops
 
IPLOOK Remote-Sensing Satellite Solution
IPLOOK Remote-Sensing Satellite SolutionIPLOOK Remote-Sensing Satellite Solution
IPLOOK Remote-Sensing Satellite Solution
IPLOOK Networks
 
Empowering Businesses in the Digital Age
Empowering Businesses in the Digital AgeEmpowering Businesses in the Digital Age
Empowering Businesses in the Digital Age
Bert Blevins
 
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-InTrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc
 
Comparison Table of DiskWarrior Alternatives.pdf
Comparison Table of DiskWarrior Alternatives.pdfComparison Table of DiskWarrior Alternatives.pdf
Comparison Table of DiskWarrior Alternatives.pdf
Andrey Yasko
 
Gen-AI in Telcos: Strategies, Challenges & Impact
Gen-AI in Telcos: Strategies, Challenges & ImpactGen-AI in Telcos: Strategies, Challenges & Impact
Gen-AI in Telcos: Strategies, Challenges & Impact
aejazahamed4
 
Choose our Linux Web Hosting for a seamless and successful online presence
Choose our Linux Web Hosting for a seamless and successful online presenceChoose our Linux Web Hosting for a seamless and successful online presence
Choose our Linux Web Hosting for a seamless and successful online presence
rajancomputerfbd
 
The Role of Technology in Payroll Statutory Compliance (1).pdf
The Role of Technology in Payroll Statutory Compliance (1).pdfThe Role of Technology in Payroll Statutory Compliance (1).pdf
The Role of Technology in Payroll Statutory Compliance (1).pdf
paysquare consultancy
 
7 Most Powerful Solar Storms in the History of Earth.pdf
7 Most Powerful Solar Storms in the History of Earth.pdf7 Most Powerful Solar Storms in the History of Earth.pdf
7 Most Powerful Solar Storms in the History of Earth.pdf
Enterprise Wired
 
BEGINNER’S GUIDE TO AI AGENTS (1).pptx...
BEGINNER’S GUIDE TO AI AGENTS (1).pptx...BEGINNER’S GUIDE TO AI AGENTS (1).pptx...
BEGINNER’S GUIDE TO AI AGENTS (1).pptx...
WriteMe
 
Pigging Solutions Sustainability brochure.pdf
Pigging Solutions Sustainability brochure.pdfPigging Solutions Sustainability brochure.pdf
Pigging Solutions Sustainability brochure.pdf
Pigging Solutions
 
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Bert Blevins
 

Recently uploaded (20)

Overview of Enterprise-scale landing zones using Cloud Adoption Framework Rea...
Overview of Enterprise-scale landing zones using Cloud Adoption Framework Rea...Overview of Enterprise-scale landing zones using Cloud Adoption Framework Rea...
Overview of Enterprise-scale landing zones using Cloud Adoption Framework Rea...
 
find out more about the role of autonomous vehicles in facing global challenges
find out more about the role of autonomous vehicles in facing global challengesfind out more about the role of autonomous vehicles in facing global challenges
find out more about the role of autonomous vehicles in facing global challenges
 
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
 
How RPA Help in the Transportation and Logistics Industry.pptx
How RPA Help in the Transportation and Logistics Industry.pptxHow RPA Help in the Transportation and Logistics Industry.pptx
How RPA Help in the Transportation and Logistics Industry.pptx
 
Quantum Communications Q&A with Gemini LLM
Quantum Communications Q&A with Gemini LLMQuantum Communications Q&A with Gemini LLM
Quantum Communications Q&A with Gemini LLM
 
Data Integration Basics: Merging & Joining Data
Data Integration Basics: Merging & Joining DataData Integration Basics: Merging & Joining Data
Data Integration Basics: Merging & Joining Data
 
Calgary MuleSoft Meetup APM and IDP .pptx
Calgary MuleSoft Meetup APM and IDP .pptxCalgary MuleSoft Meetup APM and IDP .pptx
Calgary MuleSoft Meetup APM and IDP .pptx
 
ARTIFICIAL INTELLIGENCE (AI) IN MUSIC.pdf
ARTIFICIAL INTELLIGENCE (AI) IN MUSIC.pdfARTIFICIAL INTELLIGENCE (AI) IN MUSIC.pdf
ARTIFICIAL INTELLIGENCE (AI) IN MUSIC.pdf
 
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - MydbopsScaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
 
IPLOOK Remote-Sensing Satellite Solution
IPLOOK Remote-Sensing Satellite SolutionIPLOOK Remote-Sensing Satellite Solution
IPLOOK Remote-Sensing Satellite Solution
 
Empowering Businesses in the Digital Age
Empowering Businesses in the Digital AgeEmpowering Businesses in the Digital Age
Empowering Businesses in the Digital Age
 
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-InTrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
 
Comparison Table of DiskWarrior Alternatives.pdf
Comparison Table of DiskWarrior Alternatives.pdfComparison Table of DiskWarrior Alternatives.pdf
Comparison Table of DiskWarrior Alternatives.pdf
 
Gen-AI in Telcos: Strategies, Challenges & Impact
Gen-AI in Telcos: Strategies, Challenges & ImpactGen-AI in Telcos: Strategies, Challenges & Impact
Gen-AI in Telcos: Strategies, Challenges & Impact
 
Choose our Linux Web Hosting for a seamless and successful online presence
Choose our Linux Web Hosting for a seamless and successful online presenceChoose our Linux Web Hosting for a seamless and successful online presence
Choose our Linux Web Hosting for a seamless and successful online presence
 
The Role of Technology in Payroll Statutory Compliance (1).pdf
The Role of Technology in Payroll Statutory Compliance (1).pdfThe Role of Technology in Payroll Statutory Compliance (1).pdf
The Role of Technology in Payroll Statutory Compliance (1).pdf
 
7 Most Powerful Solar Storms in the History of Earth.pdf
7 Most Powerful Solar Storms in the History of Earth.pdf7 Most Powerful Solar Storms in the History of Earth.pdf
7 Most Powerful Solar Storms in the History of Earth.pdf
 
BEGINNER’S GUIDE TO AI AGENTS (1).pptx...
BEGINNER’S GUIDE TO AI AGENTS (1).pptx...BEGINNER’S GUIDE TO AI AGENTS (1).pptx...
BEGINNER’S GUIDE TO AI AGENTS (1).pptx...
 
Pigging Solutions Sustainability brochure.pdf
Pigging Solutions Sustainability brochure.pdfPigging Solutions Sustainability brochure.pdf
Pigging Solutions Sustainability brochure.pdf
 
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
 

Importance Of Being Driven

  • 1. The Importance of Being Driven Antonio Terreno 2nd European Summer School on Agile Programming 28 June 2007, Varese
  • 2. Software design is art “ Software design is an art, and like any art it cannot be taught and learned as a precise science, by means of theorems and formulas.” Floyd Marinescu
  • 3. What drives you? To finish the story? Money? Technology? Design / Good code? Arrive at 6.00 PM safe? Career? Doh, nothing!
  • 4. The Agile Way No upfront design, requirement gathering The team makes the design Participation with the stakeholder Simple, what is simple for you? What is good for you? Refactoring, refactoring how? (dev skills) Refactoring how much? (fear)
  • 5. Test driven Do I have still to talk about this? I know you don’t like it It makes design more complicated 1 hour to write the test, 10 seconds for the code Do I really have to write all those tests? It’s simple, I can do it without a test, c’mon! I’ve done this millions of times Why not testing after? We can have a lot of testers and they are cheaper
  • 6. Behavior Driven Development Dan North, Dave Astels It’s not about testing, it’s about behavior It’s about writing specifications It’s about writing how the code works It’s about understanding how the system works It’s about understanding what I have to write Unit? Unit what? The 1-1 problem Test method names should be sentences
  • 7. BDD The given when then template Ubiquitous language, BA, DEV, QA Given When Then
  • 8. BDD Tools Tools JBehave NBehave RBehave rSpec You can write BDD also using the old stuff, don’t worry Code example
  • 9. Domain Driven Development Focus on the domain A common language Layered architecture Entities / Value Objects Services Modules Aggregates Factories Repositories
  • 10. Domain Driven Layered architecture User interface Application Layer No business logic No State of business objects Holds state of an application task progress Domain Layer Info about the domain State is held here Infrastructure Layer Communication between layers Persistence for business objects Support libraries
  • 11. Why layers? Manage changes Avoids coupling of code Avoids unexpected behaviors after changes
  • 12. Entities Objects that have an identity Spanning the life of the system and even after a Person object for example The Id does never change Some domain objects have already the concept of id National number, airport code, … All the domain objects are then entities?
  • 13. Value Objects When we care about what an object has and not about which object is How and when write a VO? First we write a VO when the object is NOT an Entity! Will be great if a VO is immutable For performance but mostly They will manifest integrity If value objects are sharable they should be immutable Keep VO thin and simple Please no huge VO, a VO can contain value objects and reference to Entities
  • 14. Services In the ubiquitous language the objects are the nouns, the services are the verbs. A service provides functionality for the domain I can’t really put this stuff on an object! A service performs an operation The operation refers to a domain concept The operations refers to other object in the domain model The operation is stateless Keeps the domain isolated
  • 15. Modules In a complex system the model grows Let’s split it in to modules, in order to reduce complexity High level of cohesion, low level of coupling Communicational cohesion Parts of the module work with same data Functional cohesion Parts of the module work together to perform well-defined tasks
  • 16. Aggregates Relations between objects One to many, many to many, complexity! First, try to remove and refactor when you don’t need it Try to reduce multiplicity and direction (bi to mono) Cascade on update/delete, usually the db does this for us Typically then what happen? Poor performances! Use aggregate An aggregate has an entity as root element Only the root is obtainable through queries The Entity is responsible of maintaining the invariants
  • 17. Factories When creating an objects instance is complex When creating an object (especially an Aggregate) is a responsibility Use factories. I create the root of the Aggregate and all the contained object Atomic creation Factories violates objects encapsulation, be careful! Use a constructor when: It’s simple All the attributes can be passed via the constructor The class is the type, there’s no need to choose different implementation
  • 18. Repositories We don’t want to be coupled to the DB/persistence infrastructure A repository encapsulate the logic in order to obtain object references It may include a Strategy It should be simple (find, add for example) A factory creates, a repository retrieves. A factory is pure domain, a repository communicates with the infrastructure
  • 19. Refactoring Don’t only write code, read it! Refactoring is redesign code without changing the behavior Do refactor when you have test coverage! Refactoring patterns Or refactor the domain itself ( can’t use pattern here) Use the verbs nouns metaphor Talk with the team Think! What the code does and why should be readable Refactoring has domain motivations not only technical ones. Including domain experts may help a lot.
  • 21. Domain Specific Languages Small, Domain focused language Domain experts themselves can understand, validate, modify, and often even develop DSL programs Do I really need a new language? Fluent interfaces Code Example
  • 22. Dev/BA Dev pair sessions with BA Domain Experts Code that “even” a BA can read and change
  • 23. Delivery Driven Focus on the delivery Focus on the after delivery Design Readability of the code Layering Tools Continuous Integration Techniques Time boxing Story Prioritization Pairing