Get Your Hands Dirty on Clean Architecture
This repository implements a small web app in the Hexagonal Architecture style, as discussed in the book "Get Your Hands Dirty on Clean Architecture".
The code has been updated to the 2nd edition of the book.
Get the print book
Get the e-book
This is the self-published version, which is only available electronically.
- Hexagonal Architecture with Java and Spring
- Building a Multi-Module Spring Boot Application with Gradle
- JDK 17
- this project uses Lombok, so enable annotation processing in your IDE
About the book
All About Hexagonal Architecture
- Learn the concepts behind "Clean Architecture" and "Hexagonal Architecture".
- Explore a hands-on approach of implementing a Hexagonal architecture with example code on GitHub.
- Develop your domain code independent of database or web concerns.
Get a Grip on Your Layers
- Learn about potential problems of the common layered architecture style.
- Free your domain layer of oppressive dependencies using dependency inversion.
- Structure your code in an architecturally expressive way.
- Use different methods to enforce architectural boundaries.
- Learn the consequences of shortcuts and when to accept them.
- ... and more.
What Readers Say
Tom Hombergs has done a terrific job in explaining clean architecture - from concepts to code. Really wish more technical books would be as clear as that one!
Love your book. One of the most practical books on hexagonal architecture I have seen/read so far.
A book taken right out of the machine room of software development. Tom talks straight from his experience and guides you through the day-to-day trade-offs necessary to deliver clean architecture.
Sebastian Kempken - Software Architect at Adcubum
Thank you for the great book, it helped me gain significant insight into how one would go about implementing hexagonal and DDD in a modern Spring project.
Spyros Vallianos - Java Developer at Konnekt-able
After reading it I had one of these 'aha' moments when things finally click in your brain.
Manos Tzagkarakis - Java Developer at Datawise
Table of Contents
- What's Wrong with Layers?
- Inverting Dependencies
- Organizing Code
- Implementing a Use Case
- Implementing a Web Adapter
- Implementing a Persistence Adapter
- Testing Architecture Elements
- Mapping Between Boundaries
- Assembling the Application
- Taking Shortcuts Consciously
- Enforcing Architecture Boundaries
- Managing Multiple Bounded Contexts
- A Component-Based Approach to Software Architecture
- Deciding on an Architecture Style