Design for the Real World
The independence of a module from the rest of the application is called loose coupling. The ability of the code within a module to be self-existent, that is to be complete and entire for its function, is called tight cohesion. Good modules are both loosely coupled and tightly cohesive. If a module has these two characteristics, then reusability becomes a possibility. If a module is reusable, that is truly wonderful.
If an application is designed well in a modular fashion, two things happen. First, it becomes easy to switch out one module for another. Second, adding a new module with new functionality becomes much easier and possibly very simple. No one knows if a module they create will be reused in the future in some ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access