Summary and Quiz: Driving the Web Layer
Test your knowledge of implementing the web layer.
We'll cover the following
Chapter’s recap
In this chapter, we completed our Wordz application. We used an integration test with TDD to drive out an HTTP endpoint for Wordz. We used open-source HTTP libraries—Molecule, Gson, and Undertow. We made effective use of hexagonal architecture. Using ports and adapters, these frameworks became an implementation detail rather than a defining feature of our design. We assembled our final application to bring together the business logic held in the domain layer with the Postgres database adapter and the HTTP endpoint adapter. Working together, our application forms a small microservice.
In this final section, we’ve arrived at a small-scale yet typical microservice comprising an HTTP API and an SQL database.
We’ve developed the code test first, using tests to guide our design choices.
We’ve applied the SOLID principles to improve how our software fits together.
We’ve learned how the ports and adapters of hexagonal architecture simplify the design of code that works with external systems. Using hexagonal architecture is a natural fit for TDD, allowing us to develop our core application logic with FIRST unit tests.
We’ve created both a database adapter and an HTTP adapter test first using integration tests. We applied the rhythms of TDD—Red, Green, Refactor—and the Arrange, Act, and Assert steps to our work.
We’ve applied test doubles using the Mockito library to stand in for external systems, simplifying the development.
In this course, we’ve covered a wide range of TDD and software design techniques. We can now create code with fewer defects, and that is safer and easier to work with.
Quiz
Get hands-on with 1200+ tech skills courses.