#architecture
4 articles
Making Invalid States Unrepresentable in Kotlin
Kotlin sealed classes and Arrow’s Either can eliminate entire categories of bugs at compile time. This article shows how to apply them to a hexagonal architecture domain model to make invalid states unrepresentable and turn hidden exceptions into explicit method signatures.
Hexagonal Architecture With Ktor and Exposed
The same hexagonal architecture patterns that work in Spring Boot translate directly to Ktor and Exposed. This article shows how, and where a lighter stack makes keeping business logic free from framework concerns more straightforward than it is with Spring Boot.
Hexagonal Architecture With Spring Boot
A practical, hands-on guide to building a Spring Boot application with Hexagonal Architecture. The article walks through separating business logic and infrastructure into modules, implementing ports and adapters, and testing the system with fast acceptance, integration, and end-to-end tests.
Hexagonal Architecture Explained
Hexagonal architecture, introduced by Alistair Cockburn, separates business logic from infrastructure using ports and adapters. This article explores the limitations of traditional layered architecture, explains how hexagonal architecture applies dependency inversion, and shows how to implement and test applications in isolation for better maintainability, flexibility, and long term code quality.