Rise of Spring Modulith

Many generations ago application development was not same as it is today. We used to build an application in a single codebase containing all functionalities. Such applications were known as Monolithic. All code was in one place, project was represented by a single folder in the system. Life was simple and everything was going smooth until humans become greedy they need more functionalities which need more humans to work on the code and a cycle started. Application’s codebases started growing exponentially and so does humans to maintain them.

Big ball of mud

A term was coined – Big ball of mud. Its an application having a single large codebase, maybe around millions lines of code or may be more who knows. Incorporating every functionality possible as proposed by business team. There are lots of packages and a lot more classes referenced from every direction possible. Developers were busy figuring out what needs to be changed, Both old and new developers have same questions in their mind – What I did wrong ? Why I am here ? ……

Microservices

As humans evolve, we started shifting our focus to micro-service architecture where multiple small codebases are maintained to avail many benefits but most importantly to avoid getting into the above nightmare. We started breaking application into independent short codebases. Every tutorial and internet resource started promoting the new architecture even beginner level courses started promoting the new concept. A simple “Hello World” application is also getting developed into two micro-services where one service (codebase) prints “Hello” and other prints “World”.

We sometimes feel a need to have older approach (monolithic) of having a single codebase containing multiple functionalities, but the nightmare prevent us to take that path again. As proper care is needed by each and every human involved in its development, which is not possible since we are humans our default setting is careless, otherwise Earth will be a better place and we might have never heard of “Big ball of mud”.

Humans started wondering how can an application be created where single codebase have all functionalities and yet have a consistent approach, where functionalities are not separated into different codebases, where everyone lives in peace and harmony and nobody have to face the nightmare again. Do we have anyone to help us. All paths looks closed, no hope left, maintaining multiple short codebase seems the only option left no matter how much redundant code we need to maintain across different codebases.

Spring Modulith

As time progress, few brave humans decided to take things in their own hands. They pick their favourite swords (keyboards) and shields (mouse) and went into an expedition – The Adventure of Modularity. Days turn into months, Months turn into years and finally they get back and introduce a new ray of hope to the world – Spring Modulith.

Spring Modulith allow humans to have a single codebase containing multiple functionalities which are logically separated into different modules. It act as a guiding light and helps in avoiding the darkness of big ball of mud.

Humans can live happily once again. They have a new approach to play around with. They can enjoy their moment until…… A new darkness arise. But don’t worry, there will always be few brave humans to help the humanity.

In this video, I will demonstrate how spring modulith can be used to create a modular SpringBoot application.

Leave a Comment

Your email address will not be published. Required fields are marked *