A Measure of Good Design

A measure of good design is how dependent higher structures are on lower ones, and this is closely related to the principle of separation of concerns and cohesion. Cohesion is a measure of how closely the elements of a module or component work together to achieve a single, well-defined purpose.

When a system is well-designed, the higher structures are not overly dependent on lower ones, and the components within the system have high cohesion. This means that changes made to the lower structures do not affect the functionality of the higher structures.

For example, a good design principle in software would be to separate the user interface from the business logic and have high cohesion within each module. This way, changes to the user interface do not affect the business logic and vice versa, allowing for more straightforward modification and maintenance of the system.

On the other hand, in a poorly designed system, the higher structures are tightly coupled with the lower ones, and the components within the system have low cohesion. The coupling of parts means that changes to the lower structures have a cascading effect on the higher structures, and the elements within the system do not have a clear and single, well-defined purpose. Coupling makes the system inflexible and difficult to modify.

However, it is essential to note that there are limitations to decoupling software components. It is crucial to consider the limitations and trade-offs involved in the process and to strike a balance between flexibility, simplicity, and performance.

Therefore, in a good design, separation of concerns, decoupling, and cohesion are vital principles leading to a more modular, flexible, and maintainable system.

Leave a Comment