Modularity
MODULARITY
• Software is divided into separately named components, often called
‘MODULES’, that are used to detect problems at ease.
• This follows the "DIVIDE AND CONQUER" conclusion. It's easier to
solve a complex problem when you break it into manageable pieces.
Why modularize a system?
• Management: Partition the overall development effort
• Evolution: Decouple parts of a system so that changes to one part are
isolated from changes to other parts – Principle of Discontinuity (Delete
a part) – Principle of Continuity (Addition to the part)
• Understanding: Permit system to be understood – as composition of
mind-sized chunks – With one issue at a time
Advantage of modularization
• Smaller components are easier to maintain
• Program can be divided based on functional aspects
• Desired level of abstraction can be brought in the program
Components with high usage can be re-used.
• Concurrent execution can be made possible
Modular Design
• Easier to change
• Easier to build
• Easier to maintain
Functional Independence
• COHESION : The degree to which a module performs one and only
one function.
• COUPLING : The degree to which a module is “connected” to other
module in the system.
Modularity Modules’ Cost Verses Size
• The effort (cost) to develop an individual software module does
decrease as the total number of modules increases. Given the same
set of requirements, more modules means smaller individual size.
However, as the number of modules grows, the effort (cost)
associated with integrating the modules also grows.
Modularity Modules’ Cost Verses Size
• These characteristics lead to a total cost or effort curve shown in the
figure. There is a number "M" of modules that would result in
minimum development cost, but we do not have the necessary
sophistication to predict M with assurance.
Self-Contained : "Agile & Autonomous"
• A module is a self-contained component of a larger software system.
This doesn't mean that it is an atomic component.
• In fact a module consists a several smaller pieces which are
collectively contributed to the functionality/performance of the
module.
• We cannot remove or modify at least any of these tiny (compared to
larger software system) components and if we do so, the 'Module' will
cease it expected functionality
Lets try to understand this by above real
world scenarios.
• A set of compartments that can mimic the modularity. Any of these
compartments can be move without affecting other components'
functionality (but when we move a module the functionality of the
whole system changes).
• A module can be installed, un-installed or moved as a whole(single
unit) and it wont affect the functionality of the other modules.
• We can form different letters by place different components(modules)
at different places and we have the freedom of moving modules
freely without affecting the functionality of other modules