Driving the Domain Layer
We laid a lot of groundwork in previous chapters, covering a mixture of TDD techniques and software design approaches. Now we can apply those capabilities to build our Wordz game. We will be building on top of the useful code we have written throughout the book and working toward a well-engineered, well-tested design, written using the test-first approach.
Our goal for this chapter is to create the domain layer of our system. We will adopt the hexagonal architecture approach as described in Chapter 9, Hexagonal Architecture – Decoupling External Systems. The domain model will contain all our core application logic. This code will not be tied to details of any external system technologies such as SQL databases or web servers. We will create abstractions for these external systems and use test doubles to enable us to test-drive the application logic.
Using hexagonal architecture in this way allows us to write FIRST unit tests for complete user stories...