Balancing Coupling in Software Design |
Author: Vlad Khononov This book looks in detail at coupling, the degree of interdependence between software modules, and how to use coupling to manage complexity and increase modularity. The concept of coupling has had a mixed history; at one point people took the position that coupling was always problematic and that microservices were a way to avoid coupling and complexity. In this book Vlad Khononov argues that developers just need to understand it in order to turn it into a constructive design tool. Khononov starts with a chapter introducing the concept of coupling, and how to measure the magnitude of coupling by looking at how much modules share their lifecycle and their knowledge. He then moves on to the concepts of coupling, and introduces the Cynefin framework, a decision-making model that developers can use to navigate complex systems. A chapter on what makes a system complex and how coupling can be used to manage complexity comes next. Chapter three takes a closer look at complexity in the context of systems, and discusses what makes a system complex and why coupling is a useful tool for managing complexity. The thinking for this is that if you have a complex system, it's best to look at interactions and actively manage them. The second part of the book considers the topic of dimensions, and how coupling manifests in strength, space and time. There's an interesting chapter on connascense, which can be used to evaluate the knowledge shared between coupled components. This is followed by a chapter looking at how connascence can be combined with module coupling to provide an integrated model for evaluating how strong the coupling is. Connascense is Latin for 'having been born together'. Chapter eight considers the effects of distance on coupling, specifically how where cross-component interactions are affected by their spatial location in the code; so two components in different libraries are further apart than two components in the same library, for example. This part of the book closes with a chapter on the effects of coupling in the time dimension, and in particular how volatile and liable to change modules are and how change over time affects coupling. The final part of the book considers balance, and how to combine the different aspects of coupling into a design tool. There's a chapter on the concept of balanced coupling and how to use the strength, distance and volatility of components to identify the complexity of a system. This is followed by a chapter that looks at ways to identify critical changes in a system and how to sort out and rebalance the coupling in the light of such changes. There's a good chapter looking at the specific change of a system growing and how this affects coupling. Khononov makes some good points about how the software industry could borrow insights from other industries to improve. Finally, there's a chapter with eight case studies that look at how to apply the balanced coupling model in practice. Having read this book, I'm still not sure whether I feel positively about coupling. However, Khononov writes engagingly most of the time, describes his subject well, and raises a lot of interesting and valid points. Worth reading. To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.
|