-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Here I start designing my model. The use of <a href="http://verraes.net/2014/06/named-constructors-in-php/" target="_blank">Named constructors</a> really helps here. It allows me to think purely about the domain at the interface level. This, for me, is where the true power of Modelling by Example is. It's BDD and indeed TDD in its truest form. The fundamental thing to look at, is the language of the model and how it maps so directly the conversation with the client `$this->house->enterRoom($room)` etc. It's DDD at play, and is a big step forward to the `$this->house->setRoom($room)` I may have done in the past. It also helps point out gaps in the initial story, considerations that haven't come up previously and thus making your model more resilient.
- Loading branch information
Showing
2 changed files
with
124 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters