Introduction
The idea of building a system entirely composed of microservices is always tempting for a developer, whether for the challenge itself or to stay ahead of scaling needs. However, analyzing trade-offs and choosing what best fits our context is also part of our profession.
A very common decision today at the beginning of a project is to build modular projects as a way of anticipating a future need to split out a dedicated service. This approach adds less initial complexity than a microservices architecture, while keeping modules sufficiently independent for a potential future separation if needed.
In this article, I will show hot to set up Gradle to enable modules on a monolithic project.
my-inflation/src/main/kotlin/com/salles/scrapping ├── data # DTO declarations ├── db │ ├── tables # Persistence table declarations ├── domain # Business logic declarations ├── repositories ├── routes ├── services └── scrapper # Feature that could move to another project
Enter fullscreen mode
Exit fullscreen…