I am trying to implement the modular design using Java Spring boot. My application has multiple modules, let's say it has modules A, B, C, and D. I would like to manage modules dynamically according to my client's order. For example, If a client orders only modules A and B, then I would be able to deploy only those modules.
It is completely new for me, I used to write monolithic applications. So I wonder
- How are real-world applications like ERP which has so many features developed?
- What is the best approach, design solution for designing such an application?
- Where can I find learning materials? I have been googling around but I could find that I am looking for.
I'd say there are 2 main ways to structure such an application.
One is microservices. You build each module as its own, self-contained application, and deploy only the applications you need. Alternatively, you build each microservice as a multi-tenant service, and give clients access to certain services based on the features they need.
Another is basically still a monolithic application, but with custom builds. You separate your modules out into different code-modules within your project, then you use a mechanism such as service loading to only load the modules for the specific client. With Spring, that's fairly easy to do since it already does classpath scanning.