Modular software
February 10, 2007 | 3:07 pmEfficiently handling complexity is one of the main reasons to modularize software. As hardware has become cheaper, we can build, combine and integrate as never before. Our success in combining the building blocks, is dependent on how modular they really are. Equally important is that we understand their function, by themselves and as they are combined. As human beings, we can handle only a limited amount of complexity and if this limit is exceeded, much time will be spent in support and debugging. Therefore we constantly have to work on modularization. We have to get better at it.
The modularization idea can be applied on all levels, from namespace-, down to method-level , when partitioning dll’s and when designing webservices for SOA. The strive for modularization should be present during the whole lifetime of a system. As time goes by and we continue to make changes to our program, we should be prepared to do some refactoring and rearrange modules to avoid dependencies building up. The system continues to live after it is delivered!
A key word is cohesion. We want to maximize cohesion, that is we put things that belong to each other in a module. Another key word is coupling. We try to minimize coupling, that is we try to minimize the dependency between the modules. Often we have to make several iterations to find the best layout of the modules.
Sometimes we have several aspects of our system that can result in different layouts. If so, we have to make a well thought out decision and choose one of them. Choose the most natural one.
Since one of the main purposes of modularization is making it easy to understand the system, we should make sure the documentation, describing the design decisions and aspects, are clear and up-to-date.










