Summary & Quiz: Driving the Web Layer

Test yourself on what you have learned so far.

We'll cover the following

Section’s recap

In this section, we have 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 have arrived at a small-scale yet typical microservice comprising an HTTP API and a SQL database. 

  • We’ve developed the code test first, using tests to guide our design choices. 

  • We have applied the SOLID principles to improve how our software fits together. 

  • We have 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 have created both a database adapter and an HTTP adapter test first, using integration tests. We applied the rhythms of TDD – Red, Green, Refactor and Arrange, Act and Assert to our work. 

  • We have applied test doubles using the Mockito library to stand in for external systems, simplifying the development.

In this course, we have 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.