Sunday, April 18, 2021

Flexibility vs architectual complexity

The Spring framework has some great technological solutions for structuring and managing complex applications. One of the probably mostly used parts is the IoC container resolving around the application context.
There are mainly two ways for leveraging this functionality, one old-school one based on xml files conatining bean definitions and one based on Annotations and Java configuration.

Both ways are highly convenient ways to wire up an application. People most of the time are very eager to use them, in some cases even without thinking about this too much.
Problems arise when an highly complex sytem is split in several configuration blocks (xml or java config) and these blocks are than shared with other applications built from the same codebase...because reusability is king.
This is when you change a seamingly innocent part of the code and you break 10 other applications, and than you are blamed for not being careful enough.
Indeed you can, and should be more careful, but if an architecture allows you to mess things up to such a great extent, that that needs probably a second thought.

Is the overlapping area between several applications a good idea? I mean, services fully configured included in several apps the same way...
Is configuration development and reuse a good practice? ...convenience over maintainability.

..or is it just me who cannot swallow this way of building an app?

Happy coding,

N

No comments:

Post a Comment