Lemi Orhan Ergin is a software crafter based on Turkey with a passion for raising the bar of his profession and sharing his experiences with communities. He is the co-founder of Craftbase and founder of Turkish Software Craftsmanship Community. He previously worked at Sony and eBay at various technical leadership roles. He has been actively programming since 2001. He is a active practitioner and mentor in Scrum, extreme programming, engineering practices and hands-on programming.
Beyti Code: Growing Hexagonal Microservices with TDD
As Simon Brown says: “If you can’t build a well-structured monolith, what makes you think microservices is the answer?”
Hexagonal architecture is a model for designing extensible, modular software applications. The idea behind it is to isolate the domain of your application from outside concerns. If hexagonal architecture is structured properly, YAGNI principle can shape our scale needs and microservices born from well-crafted monoliths easier than ever.
A developer produces considerable amount of spaghetti/lasagna code and technical debt throughout her/his career. Hexagonal architecture lets developers focus on separation of concerns, therefore leads to maintainable and extensible codebase. It can also be called as Beyti code (Beyti is a Turkish-based well-known kebab type), named due to similarities with isolation layers, the core inside and repetitive structures.
Even though hexagonal architecture is somewhat easy to understand, building it well-crafted is a hard skill. Let us show how we grow hexagonal microservices from monoliths by using TDD. We will cover the following inter-related topics as well.
- TDD touching consumer driver contract tests, unit tests, dockerized integration tests.
- Evolution of a codebase, from a modular monolith to well-crafted microservices.
- Why mono repository is important for building hexagonal microservices and what are the cures to main headaches of mono repository.