Driving Design through Examples
summary
Claims that Modeling by Example (BDD + DDD) directly drives code: write realistic Gherkin scenarios, extract domain terms (airport codes, route, fare, ticket), implement value objects and a ticket issuer, stub a fare list to avoid infrastructure, use Behat and PhpSpec to drive failing steps into small unit tests, iterate until scenario passes. Outcome is tighter domain model, far fewer full-UI runs, and faster onboarding because examples become executable, living documentation.
AI-written summary · about
chapters (24)
- 0:00Intro
- 1:06Modelling by Example Combining BDD and DDD concepts
- 2:05Behaviour Driven Development
- 3:50BDD is the art of using examples in conversations to illustrate behaviour - Liz Keogh
- 4:12Why Examples?
- 7:25Rules are Ambiguous
- 8:41Examples are Unambiguous
- 11:00Examples are Objectively Testable
- 12:21Gherkin A formal language for examples
- 12:31You do not have to use Gherkin
- 19:49Scenarios are not Contracts
- 20:04Scenarios Create a shared understanding of a feature + Give a starting definition of done → Provide an objective indication of how to test a feature
- 21:03Domain Driven Design
- 22:14DDD tackles complexity by focusing the team's attention on knowledge of the domain - Eric Evans
- 23:42Ubiquitous Language A shared way of speaking about domain concepts → Reduces the cost of translation when business and development communicate → Try to establish and use terms the business will understand
- 26:04By embedding Ubiquitous Language in your scenarios, your scenarios naturally become your domain model - Konstantin Kudryashov (@everzet)
- 27:56The best way to understand the domain is by discussing examples → Write scenarios that capture ubiquitous language → Write scenarios that illustrate real situations Directly drive the code model from those examples
- 30:21Directly driving code with Behat?
- 36:30Improving scenarios
- 37:23Add realistic details
- 38:35Actively seek terms from the domain
- 40:57Get good at listening
- 45:33Model values as Value Objects
- 49:32Model boundaries with Interfaces
related talks
45mBehaviour Driven Development and Behat: Telling Stories Through Code
40mGuided by Examples - Software Driven by Requirements
38mHow Are We Supposed to Know what We Should Create?
45mBehaviour Driven Development: Embrace Uncertainty
41mWriting better BDD scenarios
17mUnlocking Collaboration in Code: A Journey through BDD
48mMake Your Life Simple and Carefree with BDD
31mBDD: Behaviour Driven Development
