Architecture rules of thumb
There are a number of architecture rules that may help us understand how to deal with the previous undesirable situation.
The separation of concerns
The renowned Dutch computer scientist, Edsger Dijkstra, first mentioned his idea of how to organize thought efficiently in his paper from 1974, On the role of scientific thought.
He called this idea the separation of concerns. To this date, it is arguably the single most important rule in software design. There are many other well-known rules, but many of them follow from the idea of the separation of concerns. The fundamental principle is simply that we should consider different aspects of a system separately.
The principle of cohesion
In computer science, cohesionrefers to the degree to which the elements of a software module belong together.
Cohesion can be used as a measure of how strongly related the functions in a module are. It is desirable to have strong cohesion in a module.
We can see that strong cohesion is another...