Intro

Multimodularity is a software design approach that aims to enhance the maintainability, scalability, and reusability of a software application by decomposing the main API and its associated business logic into modular components.

This method involves breaking down a complex system into smaller, interconnected modules, each responsible for a specific functionality or feature.

By doing so, developers can achieve a more organized and comprehensible codebase, making it easier to manage and evolve over time





Structure

Each module is supposed to be divided into such submodules:

  • api
    • api-impl
    • api-spec
    • dto
  • integration
    • postgres
      • postgres-dao
      • postgres-schema
  • service

Learn more about the API layer here

Learn more about the Integration or dao layer here

Service is a submodule which contains the main business logic, also uses repositories with models from the dao layer and uses dtos from the API layer






Example

Here is an example multimodules with the structure described above:


Where spec-module has been reviewed in detail here

  • No labels