Separation of Concerns
Learn about cohesion and coupling in software design.
We'll cover the following...
We explored defensive programming in Python and some related topics regarding exception handling in the last lesson. Now let's move on to the next big topic: the separation of concerns.
Separating concerns
This is a design principle that is applied at multiple levels. It is not just about the low-level design (code); it is also relevant at a higher level of abstraction, so it will come up later when we talk about architecture.
Different responsibilities should go into different components, layers, or modules of the application. Each part of the program should only be responsible for a part of the functionality (what we call its concerns) and should know ...