application starting from the data model. 2. Create your domain model by reverse engineering. 3. Pretend that you’re doing TDD and start testing your domain classes. • Particularly getters and setters. 4. Now start testing the logic with Integration Tests and get stuck by test data and related issues. 5. Declare that TDD provides no benefit and only slows you down. 6. Comment tests in your Continuous Integration proccess. 7. Keep on whining. Alberto Brandolini
parameters • Needs to verify for Data Format • Needs to verify for Data Range • Services are Big and Fat • Easy to confuse one parameter with the another.
register a new account using its personal details. • Allow a customer to deposit funds into an existing account. • Allow to withdraw from an existing account. • Do not allow to withdraw more than the existing funds.
register a new account using its personal details. • Allow a customer to deposit funds into an existing account. • Allow to withdraw from an existing account. • Do not allow to withdraw more than the existing funds.
only. • Scope of consistency inside the aggregate boundaries and update other aggregates through eventual consistency. • Aggregates are small. • Aggregates implement behaviors. • One Aggregate Root for every Entity is a Code Smell.
Unique by the comparisson of the atributes. • Used to describe, measure or quantify an Entity. First Name Last Name Personnummer Mobile Phone Number Amount Description
Bounded Context Personal Expenses Bounded Context We only pay for the complexity we really use string Phone Number Thread null string int Reflection double collection HttpClient Without Value Objects With Value Objects We bring the .NET Framework Complexity into our Bounded Context. null int Reflection double collection HttpClient
own class¹. • Classes that contains collections do not contains any other variable. • Behaviors have a home. • When necessary return immutable collection copies. Account Transaction 1:N ¹The ThoughtWorks Anthology: Essays on Software Technology and Innovation (Pragmatic Programmers), 2008
Domain Model. Then return to covering it with unit tests. • By knowing the DDD patterns I understimate the TDD value then I'm slapped in the face. • My goal is to maintain a high test coverage on the Domain Model. • If testing is hard. It is an architectural issue!