TDD & DDD from the Ground Up (Live Coding)
summary
Live coding shows a .NET Web API built with C# (optionally Java) using xUnit, WebApplicationFactory and in‑memory EF while following red–green–refactor TDD: start with tiny API tests, add persistence, then encapsulate behavior. A capacity bug appears when 3-seat rooms accept a 4th via concurrent enrollments, revealing a race condition that naive controller checks or an aggregate/locking solution would fix. Instead the design moves the constraint to a scheduling step and implements a scheduler that sorts courses by demand and rooms by capacity.
AI-written summary · about
chapters (20)
- 0:00Talk overview
- 1:06TDD and DDD basics
- 3:14University registration system
- 7:51First failing test
- 10:31Minimal registration logic
- 13:23Student ID and response
- 16:10Domain language in code
- 18:17Retrieving student details
- 20:43Adding student persistence
- 23:56Refactoring tests and API
- 25:43Room and course entities
- 29:35Courses linked to rooms
- 35:40Enrollment process constraints
- 41:49Race conditions in enrollment
- 47:09Re-evaluating constraints
- 51:23Removing checks
- 55:14Scheduling algorithm
- 57:19Simple scheduling algorithm
- 1:00:30Refactoring entity models
- 1:04:00Summary and resources
related talks
01h 00mTDD & DDD from the Ground Up
47mTDD & DDD from the Ground Up
48mTDD - It's About More Than Just the Tests
43mTechnology mix: Test-Driven Development in action: live session
01h 05mGetting to DDD: Pragmatic or Principled?
01h 03mExposing the not-so-secret practices of the cult of DDD
01h 03mExposing the not-so-secret practices of the cult of DDD
01h 03mExposing the not-so-secret practices of the cult of DDD
