Clean Architecture in a Spring Application
The remarkable explosion of APIs, the effortless security integration, the popularity of the platforms enabling their consumption drives us to grasp more.
Within this article we’ll explore the basic architectural principles behind a Spring Application. We’ll look at it through eyes of a Clean Architect (A Craftsman’s guide to Software Architecture and Design. We’ll enrich, apply and map various principles to best libraries throughout the development of a REST Based Spring Application. In the end we’ll have a clear understanding the role played by Clean Architecture in a Spring Application.
One value of a good software product comes from its behavior. Another value of a software product is its structure. We’ll focus on the later.
Architecture
The most important lesson I got out of the book is to postpone taking a decision unless I am not required to. Keep your options opened all the time. Go as far as not even imposing an extension mechanism/pattern unless you have to. Ask yourself questions such as:
- Do I actually need a database or could your system work as well with files?
- Do I really need a Graphical Interface?
- Does my Graphical Interface really need to be written in a certain framework?
- Do I really have so much traffic to need a Micro-service…