
🏗️ Good architecture is not just about diagrams: it aims to make future changes cheaper. In his summary of a PyCon NL talk, the author explains two key ideas: high cohesion and loose coupling.
Cohesion describes whether the parts of a module work toward the same goal. Coupling describes how many parts of a system might break when one changes. If an API function knows the database’s details directly, a database change may also force changes to the API.
One solution is to define a domain model as a contract between layers. The database can then change without directly affecting presentation. Business rules should also have their own home, protected from external details.
💡 Explanation in a nutshell#
Think of a kitchen: each station has a clear task, and changing a recipe should not bring the whole restaurant to a halt. In software, separating responsibilities and reducing dependencies makes it easier to change one part without reworking everything else.
More information at the link 👇
