scrum + bdd + ddd
TRANSCRIPT
![Page 1: Scrum + bdd + ddd](https://reader030.vdocuments.us/reader030/viewer/2022021420/588920011a28ab77528b51d1/html5/thumbnails/1.jpg)
Scrum + BDD + DDD@HelderDOliveira
![Page 2: Scrum + bdd + ddd](https://reader030.vdocuments.us/reader030/viewer/2022021420/588920011a28ab77528b51d1/html5/thumbnails/2.jpg)
@HelderDOliveira
Father, husband, brother, son, Venezuelan, Portuguese, Informatic Engineer, CSM, CSPO, CSD, CSP, Java Certified, Scrum Master, Software Architect, QA, aspiring Software Craftsman, wannabe guitar player, painter, anarchist, agustiniano, ucabista, magallanero, benfiquista, colchonero, GoT fan, gamer, friki, et. al.
http://www.agilemanifesto.org/
Who am I?
DEVELOPER
![Page 3: Scrum + bdd + ddd](https://reader030.vdocuments.us/reader030/viewer/2022021420/588920011a28ab77528b51d1/html5/thumbnails/3.jpg)
![Page 4: Scrum + bdd + ddd](https://reader030.vdocuments.us/reader030/viewer/2022021420/588920011a28ab77528b51d1/html5/thumbnails/4.jpg)
SM
![Page 5: Scrum + bdd + ddd](https://reader030.vdocuments.us/reader030/viewer/2022021420/588920011a28ab77528b51d1/html5/thumbnails/5.jpg)
Scrum Master, they say…Servile Leader, they say…… … (cabrones!)
![Page 6: Scrum + bdd + ddd](https://reader030.vdocuments.us/reader030/viewer/2022021420/588920011a28ab77528b51d1/html5/thumbnails/6.jpg)
![Page 7: Scrum + bdd + ddd](https://reader030.vdocuments.us/reader030/viewer/2022021420/588920011a28ab77528b51d1/html5/thumbnails/7.jpg)
Manifesto for Agile Software Development
We are uncovering better ways of developingsoftware by doing it and helping others do it.Through this work we have come to value:
Individuals and interactions over processes and toolsWorking software over comprehensive documentation
Customer collaboration over contract negotiationResponding to change over following a plan
That is, while there is value in the items onthe right, we value the items on the left more.
![Page 8: Scrum + bdd + ddd](https://reader030.vdocuments.us/reader030/viewer/2022021420/588920011a28ab77528b51d1/html5/thumbnails/8.jpg)
Agile ManifestoWe are uncovering better ways of developing software by doing it and helping others do it.
http://www.agilemanifesto.org/
![Page 9: Scrum + bdd + ddd](https://reader030.vdocuments.us/reader030/viewer/2022021420/588920011a28ab77528b51d1/html5/thumbnails/9.jpg)
Agile ManifestoWelcome changing requirements, even late in development. Agile processes harness change for the customer's competitive advantage.
http://www.agilemanifesto.org/principles.html
![Page 10: Scrum + bdd + ddd](https://reader030.vdocuments.us/reader030/viewer/2022021420/588920011a28ab77528b51d1/html5/thumbnails/10.jpg)
ScrumDefinition of Scrum
Scrum (n): A framework within which people can address complex adaptive problems, while productively and creatively delivering products of the highest possible value.
http://www.scrumguides.org/docs/scrumguide/v1/Scrum-Guide-US.pdf
![Page 11: Scrum + bdd + ddd](https://reader030.vdocuments.us/reader030/viewer/2022021420/588920011a28ab77528b51d1/html5/thumbnails/11.jpg)
Scrum
![Page 12: Scrum + bdd + ddd](https://reader030.vdocuments.us/reader030/viewer/2022021420/588920011a28ab77528b51d1/html5/thumbnails/12.jpg)
Scrum
![Page 13: Scrum + bdd + ddd](https://reader030.vdocuments.us/reader030/viewer/2022021420/588920011a28ab77528b51d1/html5/thumbnails/13.jpg)
Where is the ‘how’?
https://vimeo.com/82544417
![Page 14: Scrum + bdd + ddd](https://reader030.vdocuments.us/reader030/viewer/2022021420/588920011a28ab77528b51d1/html5/thumbnails/14.jpg)
Alternatives● Hexagonal architecture
● Clean Architecture
● Domain-Driven Design
● et. al.
![Page 15: Scrum + bdd + ddd](https://reader030.vdocuments.us/reader030/viewer/2022021420/588920011a28ab77528b51d1/html5/thumbnails/15.jpg)
Domain-Driven Design (DDD)Is an approach to developing software for complex needs by deeply connecting the implementation to an evolving model of the core business concepts.
![Page 16: Scrum + bdd + ddd](https://reader030.vdocuments.us/reader030/viewer/2022021420/588920011a28ab77528b51d1/html5/thumbnails/16.jpg)
DDD● Place the project’s primary focus on the core domain and domain logic
● Base complex designs on a model
● Initiate a creative collaboration between technical and domain experts to iteratively cut ever closer to the conceptual heart of the problem.
![Page 17: Scrum + bdd + ddd](https://reader030.vdocuments.us/reader030/viewer/2022021420/588920011a28ab77528b51d1/html5/thumbnails/17.jpg)
DDDDomain model:
● A software model based specifically in the domain of the business you are working with
● It's usually build as an object model, where objects have both data and behaviour with accurate business meaning
● Since we are going to create a software solution for a problem in the domain, we need a form of simplification of that domain to base the solution on.
![Page 18: Scrum + bdd + ddd](https://reader030.vdocuments.us/reader030/viewer/2022021420/588920011a28ab77528b51d1/html5/thumbnails/18.jpg)
DDDUbiquitous Language
The practice of building up a common, rigorous language between developers and users. This language should be based on the Domain Model used in the software - hence the need for it to be rigorous, since software doesn't cope well with ambiguity.
http://martinfowler.com/bliki/UbiquitousLanguage.html
![Page 19: Scrum + bdd + ddd](https://reader030.vdocuments.us/reader030/viewer/2022021420/588920011a28ab77528b51d1/html5/thumbnails/19.jpg)
DDD
Strategic model Tactic model
![Page 20: Scrum + bdd + ddd](https://reader030.vdocuments.us/reader030/viewer/2022021420/588920011a28ab77528b51d1/html5/thumbnails/20.jpg)
DDDStrategic model:
● Domain● Subdomain● Core domain● Context
![Page 21: Scrum + bdd + ddd](https://reader030.vdocuments.us/reader030/viewer/2022021420/588920011a28ab77528b51d1/html5/thumbnails/21.jpg)
DDDStrategic model patterns:
● anticorruption layer● open host service● published language
![Page 22: Scrum + bdd + ddd](https://reader030.vdocuments.us/reader030/viewer/2022021420/588920011a28ab77528b51d1/html5/thumbnails/22.jpg)
DDDTactic model
![Page 23: Scrum + bdd + ddd](https://reader030.vdocuments.us/reader030/viewer/2022021420/588920011a28ab77528b51d1/html5/thumbnails/23.jpg)
Scrum + DDD● DDD and Scrum needs a good involvement of product owners to make it a
success.● DDD and Scrum works with stories:
○ DDD uses stories to create and verify the model.○ Scrum uses stories to determine the scope for each sprint, write tests
and running software.● About tests:
○ Scrum uses acceptance criteria to verify if the story is implemented○ DDD uses tests to create a good API.
![Page 24: Scrum + bdd + ddd](https://reader030.vdocuments.us/reader030/viewer/2022021420/588920011a28ab77528b51d1/html5/thumbnails/24.jpg)
Scrum + DDD● DDD and Scrum needs a good involvement of product owners to make it a
success.● DDD and Scrum works with stories:
○ DDD uses stories to create and verify the model.○ Scrum uses stories to determine the scope for each sprint, write tests
and running software.● About tests:
○ Scrum uses acceptance criteria to verify if the story is implemented○ DDD uses tests to create a good API.
![Page 25: Scrum + bdd + ddd](https://reader030.vdocuments.us/reader030/viewer/2022021420/588920011a28ab77528b51d1/html5/thumbnails/25.jpg)
Where is the glue?
![Page 26: Scrum + bdd + ddd](https://reader030.vdocuments.us/reader030/viewer/2022021420/588920011a28ab77528b51d1/html5/thumbnails/26.jpg)
Alternatives● ATDD:
Acceptance Test Driven Development
● TDD: Test Driven Development (outside in / classicist)
● BDD: Behaviour-Driven Development
![Page 27: Scrum + bdd + ddd](https://reader030.vdocuments.us/reader030/viewer/2022021420/588920011a28ab77528b51d1/html5/thumbnails/27.jpg)
Behavior-Driven Development (BDD)A software development process that emerged from TDD.
BDD provide software development and management teams with shared tools and a shared process to collaborate on software development.
![Page 28: Scrum + bdd + ddd](https://reader030.vdocuments.us/reader030/viewer/2022021420/588920011a28ab77528b51d1/html5/thumbnails/28.jpg)
Corey Haines - BDD in 5 minutes
https://vimeo.com/23061155
![Page 29: Scrum + bdd + ddd](https://reader030.vdocuments.us/reader030/viewer/2022021420/588920011a28ab77528b51d1/html5/thumbnails/29.jpg)
BDD● Slice into problem domains
● Each domain has its own stakeholders
● Each domain has its own language
● Test the behaviors of each domain
● Isolate tests using test doubles
● Stub other domains and external systems
![Page 30: Scrum + bdd + ddd](https://reader030.vdocuments.us/reader030/viewer/2022021420/588920011a28ab77528b51d1/html5/thumbnails/30.jpg)
BDDStory: Returns go to stock
In order to keep track of stockAs a store ownerI want to add items back to stock when they're returned
Scenario 1: Refunded items should be returned to stockGiven a customer previously bought a black sweater from meAnd I currently have three black sweaters left in stockWhen he returns the sweater for a refundThen I should have four black sweaters in stock
Scenario 2: Replaced items should be returned to stockGiven that a customer buys a blue garmentAnd I have two blue garments in stockAnd three black garments in stock.When he returns the garment for a replacement in black,Then I should have three blue garments in stockAnd two black garments in stock
Gherkin
![Page 31: Scrum + bdd + ddd](https://reader030.vdocuments.us/reader030/viewer/2022021420/588920011a28ab77528b51d1/html5/thumbnails/31.jpg)
BDD
![Page 32: Scrum + bdd + ddd](https://reader030.vdocuments.us/reader030/viewer/2022021420/588920011a28ab77528b51d1/html5/thumbnails/32.jpg)
Example: Recruitment Process
![Page 33: Scrum + bdd + ddd](https://reader030.vdocuments.us/reader030/viewer/2022021420/588920011a28ab77528b51d1/html5/thumbnails/33.jpg)
Rec
ruitm
ent P
roce
ss
![Page 34: Scrum + bdd + ddd](https://reader030.vdocuments.us/reader030/viewer/2022021420/588920011a28ab77528b51d1/html5/thumbnails/34.jpg)
Inception1. Why are we here?
We need a recruitment system in order to track respectfully all the events with our candidates
![Page 35: Scrum + bdd + ddd](https://reader030.vdocuments.us/reader030/viewer/2022021420/588920011a28ab77528b51d1/html5/thumbnails/35.jpg)
Inception2. Elevator pitch
For recruiterswho interact with many candidatesthe recruiting system (RS)is a communication toolthat informs the recruiters the status of any candidate.Unlike the current paper processour RS is web based so can be accessed anywhere anytime
![Page 36: Scrum + bdd + ddd](https://reader030.vdocuments.us/reader030/viewer/2022021420/588920011a28ab77528b51d1/html5/thumbnails/36.jpg)
Inception… and so on, until ...
![Page 37: Scrum + bdd + ddd](https://reader030.vdocuments.us/reader030/viewer/2022021420/588920011a28ab77528b51d1/html5/thumbnails/37.jpg)
Inception6. Solution
![Page 38: Scrum + bdd + ddd](https://reader030.vdocuments.us/reader030/viewer/2022021420/588920011a28ab77528b51d1/html5/thumbnails/38.jpg)
Inception6. Solution
XPlease, watch this: Ruby Midwest 2011 - Keynote: Architecture the Lost Years by Robert Martinhttps://www.youtube.com/watch?v=WpkDN78P884
![Page 39: Scrum + bdd + ddd](https://reader030.vdocuments.us/reader030/viewer/2022021420/588920011a28ab77528b51d1/html5/thumbnails/39.jpg)
Inception6. Solution
<domain>Recruitment
<core domain>Profile
<sub-domain>Assessment
<sub-domain>Interview
Interview Context
Assessment Context
Profile Context
![Page 40: Scrum + bdd + ddd](https://reader030.vdocuments.us/reader030/viewer/2022021420/588920011a28ab77528b51d1/html5/thumbnails/40.jpg)
Teams<domain>
Recruitment
<core domain>Profile
<sub-domain>Assessment
<sub-domain>Interview
Interview Context
Assessment Context
Profile Context
![Page 41: Scrum + bdd + ddd](https://reader030.vdocuments.us/reader030/viewer/2022021420/588920011a28ab77528b51d1/html5/thumbnails/41.jpg)
Wall time!
![Page 42: Scrum + bdd + ddd](https://reader030.vdocuments.us/reader030/viewer/2022021420/588920011a28ab77528b51d1/html5/thumbnails/42.jpg)
Profile context: user storiesAs a recruiterI want to create a new candidate profileIn order to track his recruitment process events
As a recruiterI want to add a position to a candidateIn order to list his past jobs
...
![Page 43: Scrum + bdd + ddd](https://reader030.vdocuments.us/reader030/viewer/2022021420/588920011a28ab77528b51d1/html5/thumbnails/43.jpg)
Profile context: acceptance testAs a recruiterI want to create a new candidate profileIn order to track his recruitment process events
Given a candidate’s name “Helder De Oliveira”and candidate’s email “[email protected]”and candidate’s phone number “00351 234987654”When I request to add the candidateThen the candidate should be stored
![Page 44: Scrum + bdd + ddd](https://reader030.vdocuments.us/reader030/viewer/2022021420/588920011a28ab77528b51d1/html5/thumbnails/44.jpg)
Profile context: acceptance test (HTML format)
![Page 45: Scrum + bdd + ddd](https://reader030.vdocuments.us/reader030/viewer/2022021420/588920011a28ab77528b51d1/html5/thumbnails/45.jpg)
Profile context: acceptance test (HTML format)
![Page 46: Scrum + bdd + ddd](https://reader030.vdocuments.us/reader030/viewer/2022021420/588920011a28ab77528b51d1/html5/thumbnails/46.jpg)
Profile context: fixtureTest / Fixture
![Page 47: Scrum + bdd + ddd](https://reader030.vdocuments.us/reader030/viewer/2022021420/588920011a28ab77528b51d1/html5/thumbnails/47.jpg)
Profile context: acceptance test failing
![Page 48: Scrum + bdd + ddd](https://reader030.vdocuments.us/reader030/viewer/2022021420/588920011a28ab77528b51d1/html5/thumbnails/48.jpg)
Profile context: fixtureTest / Fixture
Registry
Application Service
![Page 49: Scrum + bdd + ddd](https://reader030.vdocuments.us/reader030/viewer/2022021420/588920011a28ab77528b51d1/html5/thumbnails/49.jpg)
Profile context: application service unit test failingUnit Test
Registry
Application Service
![Page 50: Scrum + bdd + ddd](https://reader030.vdocuments.us/reader030/viewer/2022021420/588920011a28ab77528b51d1/html5/thumbnails/50.jpg)
Profile context: repository accessUnit Test
Registry
Application Service
Repository
![Page 51: Scrum + bdd + ddd](https://reader030.vdocuments.us/reader030/viewer/2022021420/588920011a28ab77528b51d1/html5/thumbnails/51.jpg)
Profile context: repository unit test failingUnit Test
Registry
Application Service
Repository
![Page 52: Scrum + bdd + ddd](https://reader030.vdocuments.us/reader030/viewer/2022021420/588920011a28ab77528b51d1/html5/thumbnails/52.jpg)
Profile context: repository developed and test okUnit Test
Registry
Application Service
Repository
![Page 53: Scrum + bdd + ddd](https://reader030.vdocuments.us/reader030/viewer/2022021420/588920011a28ab77528b51d1/html5/thumbnails/53.jpg)
Profile context: application service and test okUnit Test
Registry
Application Service
Repository
![Page 54: Scrum + bdd + ddd](https://reader030.vdocuments.us/reader030/viewer/2022021420/588920011a28ab77528b51d1/html5/thumbnails/54.jpg)
Profile context: acceptance test ok
![Page 55: Scrum + bdd + ddd](https://reader030.vdocuments.us/reader030/viewer/2022021420/588920011a28ab77528b51d1/html5/thumbnails/55.jpg)
Warning: this code could smell better...
![Page 56: Scrum + bdd + ddd](https://reader030.vdocuments.us/reader030/viewer/2022021420/588920011a28ab77528b51d1/html5/thumbnails/56.jpg)
Scrum + BDD + DDDP
rodu
ct B
ackl
og
Spr
int
Bac
klog
APIService
AggregateEntity / V.O.Repository
Fact
ory
APIService
AggregateEntity / V.O.Repository
Fact
ory
![Page 57: Scrum + bdd + ddd](https://reader030.vdocuments.us/reader030/viewer/2022021420/588920011a28ab77528b51d1/html5/thumbnails/57.jpg)
Software Craftsmanship Madridhttp://www.meetup.com/es/madswcraft/
![Page 58: Scrum + bdd + ddd](https://reader030.vdocuments.us/reader030/viewer/2022021420/588920011a28ab77528b51d1/html5/thumbnails/58.jpg)
I H
AVE
QUESTIONS
NOW!!!
@HelderDOliveira