Summary

In this chapter, we briefly talked about software design and a few basic design principles. We implemented a fully-functional version of the board game Connect4 using two approaches: traditional and test-driven development.

We analyzed both solutions in terms of pros and cons, and used a Hamcrest framework to empower our tests.

Finally, we concluded that good design and good practices can be performed by both approaches, but TDD leads developers to the better way.

For further information about the topics that this chapter covers, refer to two highly recommended books written by Robert C. Martin: Clean Code: A Handbook of Agile Software Craftsmanship and Agile Software Development: Principles, Patterns, and Practices.

Get Test-Driven Java Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.