Hexagonal Architecture: How to Beat Spaghetti Code?
summary
Describes using hexagonal architecture to stop “spaghetti” code by inverting dependencies into ports and adapters so domain code stays unchanged during migrations. Demonstrates migrating a MySQL service to Spring Data JPA and planning to swap JMS for RabbitMQ by adding concrete adapters (e.g., TalkRepositoryAdapter and a Rabbit listener adapter) while the application continues to return talks without domain changes. Shows enforcing the intended structure with ArchUnit rules to keep architecture and tests stable.
AI-written summary · about
chapters (8)
- 0:00Introduction
- 1:27Evolving spaghetti code
- 3:58Strong DB dependencies
- 4:41Inverting dependencies
- 7:02Spring Data JPA migration
- 10:27Hexagonal architecture
- 11:56Preserving architecture
- 13:42Summary and conclusion
related talks
52mWhy not all hexagons have eight sides
01h 01mWhy not all hexagons have eight sides
50mHexagonal Architecture in Practice, Live Coding That Will Make Your Applications More Sustainable
47mHexagonal Architecture in Practice, Live Coding That Will Make Your Applications More Sustainable
01h 51mHexagonal Architecturoplasty of a Backend: Open‑Code Operation
25mHexagonal Architecture in Monoliths and Microservices
46mHexagonal Architecture in Practice
51mHexagonal Architecture to the rescue
