Functional Kotlin: Hexagonal Architecture with Arrow Types Implementation
The purpose of this project is to implement the hexagonal architecture in Kotlin. It serves as a simple task manager with constraints related to state transitions. For more details, refer to the section below. This implementation utilizes functional programming libraries. Some benefits of using Arrow include: side-effect-free domain, easier testing, composability, and more. The project consists of multiple Gradle subprojects: domain (excluding Arrow, with no external libraries), infra-web (includes the web server to be launched), and infra-db (used solely for simulating database adapters). Thus, the domain and business logic are isolated from any infrastructure code. Ktor is used as the web server purely for learning purposes. This project can certainly be improved, such as adding integration tests with Ktor. The hexagonal architecture isolates our business rules and domain from any technological implementations. It first validates requests and then processes them if valid. The state diagram illustrates that canceled or completed tasks cannot be moved.
159.05KB
文件大小:
评论区