Modularity

What is Modularity?

A property of a specific view of a system (artificial or natural), where the system can be composed/decomposed into components that have a form of independence – with respect to some properties.

Modularity in Software Design

Modularity is an important principle of design which is originated in nature. It is a practical application of Separations of Concerns (SoC) principle of computer science. There are two approaches of modularization, composition and decomposition.

The composition (bottom-up) approach takes modules and put them together to form a large system. The assembly of a car is an application of this approach. The composition process begins with the assembling of electronic and mechanical modules such as the engine, lights, seats etc.

The decomposition (top-down) approach takes a complete system and decompose it into its modules. A car can be decomposed into subsystems as fuel system, transmission system, electrical system etc. The electrical system can be decomposed into alternator, battery, lights etc. The decomposition process repeats it self until all elementary components are identified.

Loosely coupled cohesion modules makes software systems more understandable, manageable and maintainable. A TV box and a TV together represents a loosely coupled cohesion system. Each of these devices can function independently (loosely coupled). But to make it useful need to connect both together (cohesion). To work on a single module of a modular software system, developers do not need to understand the function of the entire system. And modules can assign to different developers to work parallel.

Evaluation of Modularity

  • Composability
  • Decomposability
  • Understandability
  • Continuity – Changes in problem specification should effect on relevant modules instead the overall architecture.
  • Protection – Limit the propagation of errors to other modules as much as possible.

References

Images

Leave a Reply

Your email address will not be published. Required fields are marked *