SlideShare a Scribd company logo
1 of 25
Effective Modular
Unit IV
Lecture no. 28
By Dr. Shweta Saraswat
What is Modular Design?
Definition:
A design based on modular units that can be
assembled in a variety of ways.
Now What is Modularity?
Definition of Modularity:
• Software is divided into separately named an addressable
components, called modules, that are integrated to
satisfy problem requirements.
• The graph shown refers to the question of Modularity
and Software Cost, and is a useful tool to consider when
modularity is to be implemented. In this graph, the cost
or effort drops as more modules are considered, but the
cost to interface modules increases as we have more
modules. Thus, we must take care to stay in the region of
minimum cost, i.e. a balance between the number of
modules and the cost or effort.
Example
Effective Modular Design
• Modularity is an accepted approach in all
engineering disciplines
• Reduces complexity and facilitates changes
in modules
• Easier implementation
Effective Modular Design
• Modularity The real power of partitioning comes if a
system is partitioned into modules so that the modules
are solvable and modifiable separately.
• It will be even better if the modules are also separately
compliable (then, changes in a module will not require
recompilation of the whole system).
• A system is considered modular if it consists of discreet
components so that each component can be
implemented separately, and a change to one
component has minimal impact on other components.
Effective Modular Design
• Modularity is a clearly a desirable property in a
system.
• Modularity helps in system debugging. Isolating the
system problem to a component is easier if the
system is modular.
• In system repair, hanging a part of the system is easy
as it affects few other parts and in system building, a
modular system can be easily built by “putting its
modules together.”
Effective Modular Design
• A software system cannot be made modular by simply
chopping it into a set of modules.
• For modularity, each module needs to support a well-
defined abstraction and have a clear interface through
which it can interact with other modules.
• Modularity is where abstraction and partitioning come
together.
• For easily understandable and maintainable systems,
modularity is clearly the basic objective; partitioning and
abstraction can be viewed as concepts that help achieve
modularity.
Desirable Characteristics of Module
• The attributes of a good module are as follows:
• A small program that can be invoked by the operating
system, or it could be a sub-program invoked by another
module(shareable)
• The statement are collectively referred to by a
descriptive name called the module name
• A module must return to its caller i.e. have a single entry
and exit; (single entry and exit module to ensure that
modules are closed and simplify program maintenance)
• The module should be relatively small in size (small
modules allow for more easily amended programs,
estimating and project control more accurate and
exhaustive testing are easier)
• It should be easy to read, modify and use
• A module should preferably have a single function
Advantages of Modularity
• Rationale for Modularity
• Allow large program to be written by several or
different people
• Encourage creation of commonly used routines to be
placed in library and/or be used by other programs
• Simplify overlay procedure of loading large program
into main storage
• Provide more check point to measure progress
• Simplify design, making program easy to modify and
reduce maintenance costs
• Provide a framework for more complete testing,
easier to test
• Produces well-designed and more readable program
Disadvantages of Modularity
• Rational Against Modularity
• Execution time may be, but not necessarily,
longer
• Storage size may be, but is not necessarily,
increased
• Compilation and loading time may be longer
• Intermodule communication problems may be
increased
• Demands more initial design time
• More linkage required, run-time may be longer,
more source lines must be written and more
documentation has to be done
Top-Down and Bottom-Up Strategies
• A system consists of components, which have components of
their own; indeed, a system is a hierarchy of components.
• The highest-level component corresponds to the total system.
• To design such a hierarchy there are two possible approaches:
top-down and bottom-up.
• The top-down approach starts from the highest-level
component of the hierarchy and proceeds to lower levels.
• By contrast, a bottom-up approach starts with the lowest-
level component of the hierarchy and proceeds through
progressively higher levels to the top-level component.
Module-Level Concepts
• A module is a logically separable part of a program. It is a
program unit that is discreet and identifiable with respect to
compiling and loading. In terms of common programming
language constructs, a module can be a macro, a function, a
procedure (or subroutine), a” process, or a package. In
systems using functional abstraction, a module is usually a
procedure of function or a collection of these.
• To produce modular designs, some criteria must be used to
select modules so that the modules support well-defined
abstractions and are solvable and modifiable separately. In a
system using functional abstraction, coupling and cohesion
are two modularization criteria, which are often used
together.
Functional Independence
• The concept of functional independence is a direct outgrowth of
modularity and the concepts of abstraction and information hiding.
• Functional independence is achieved by developing modules with “single-
minded’ function and an “aversion” to excessive interaction with other
modules.
• Stated another way, we want to design software so that each module
addresses a specific sub-function of requirements and has a simple
interface, when viewed from other parts of the program structure. It is fair
to ask, why independence is important.
• Software with effective modularity, that is, independent modules, is
easier to develop because functions may be compartmentalized and
interfaces are simplified (consider the ramifications when development is
conducted by a team).
• Independent modules are easier to maintain (and test) because
secondary effects caused by design or code modification are limited, error
propagation is reduced, and reusable modules are possible.
• To summarize, functional independence is a key to good design, and
design is the key to software quality.
Data Structure
• Data structure is a representation of the logical relationship
among individual elements of data.
• Because the structure of information will invariably affect the
final procedural design, data structure is as important as
program structure to the representation of software
architecture.
• Data structure dictates the organization, methods of access,
degree of associativity, and processing alternatives for
information.
• Entire texts have been dedicated to these topics, and a
complete discussion is beyond the scope of this book.
• However, it is important to understand the classic methods
available for organizing information and the concepts that
underlie information hierarchies.
Coupling
• A fundamental goal of software design is to structure the software
product so that the number and complexity of interconnections between
modules is minimized.
• An appealing set of heuristics, for achieving this goal, involves the
concepts of coupling and cohesion.
• Two modules are considered independent if one can function completely
without the presence of other.
• Obviously, if two modules are independent, they are solvable and
modifiable separately.
• However, all the modules in a system cannot be independent of each
other, as they must interact so that together, they produce the desired
external behavior of the system.
• The more connections between modules, the more dependent they are in
the sense that more knowledge about one module is required to
understand or solve the other module.
• Hence, the fewer and simpler the connections between modules, the
easier it is to understand one without understanding the other. The notion
of coupling attempts to capture this concept of “how strongly” different
modules are interconnected.
Cohesion
• The internal cohesion of a module is measured in terms of the strength of binding
elements within the module. Cohesion of elements occurs on the scale of weakest
(least desirable) to strongest (most desirable).
• We have seen that coupling is reduced, when the relationships among elements, in
different modules are minimized. That is, coupling is reduced when elements in
different modules have little or no bonds between them. Another way of achieving this
effect is to strengthen the bond between elements of the same module by maximizing
the relationship between elements of the same module. Cohesion is the concept that
tries to capture this intramodule. With cohesion, we are interested in determining how
closely the elements of a module are related to each other.
• Cohesion of a module represents how tightly the internal elements of the module are
bound to one another. Cohesion of a module gives the designer an idea about whether
the different elements of a module belong together in the same module. Cohesion and
coupling are clearly related. Usually, the greater the cohesion of each module in the
system, the lower the coupling between modules is. This correlation is not perfect, but
it has been observed in practice. There are several levels of cohesion:
• Coincidental
• Logical
• Temporal
• Procedural
• Communicational
• Sequential
• Functional
Cohesion
• Coincidental is the lowest level, and functional is the highest. These levels do not form a
linear scale. Functional binding is much stronger than the rest, while the first two are
considered much weaker than others.
• Coincidental cohesion occurs when there is no meaningful relationship among the
elements of a module. Coincidental cohesion can occur if an existing program is
“modularized”, by chopping it into pieces and making different piece modules.
• A module has logical cohesion if there is some logical relationship between the elements
of a module, and the elements perform functions that fall in the same logical class.
• Temporal cohesion is the same as logical cohesion, except that the elements are also
related in time and are executed together
• A procedurally cohesive module contains elements that belong to a common procedural
unit. For example, a loop or a sequence of decision statements in a module may be
combined to form a separate module.
• A module with communicational cohesion has elements that are related by a reference to
the same input or output data.
• When the elements are together in a module, because the output of one forms the input
to another, we get sequential cohesion.
• Functional cohesion is the strongest cohesion. In a functionally bound module, all the
elements of the module are related to performing a single function.
Conclusion
• A software system cannot be made modular by simply
chopping it into a set of modules.
• For modularity, each module needs to support a well-
defined abstraction and have a clear interface through
which it can interact with other modules.
• Modularity is where abstraction and partitioning come
together.
• For easily understandable and maintainable systems,
modularity is clearly the basic objective; partitioning and
abstraction can be viewed as concepts that help achieve
modularity.
Thank You

More Related Content

Similar to effective modular design.pptx

Similar to effective modular design.pptx (20)

Software Design - SDLC Model
Software Design - SDLC ModelSoftware Design - SDLC Model
Software Design - SDLC Model
 
Se 381 - lec 23 - 28 - 12 may16 - modularity - ii - cohesion
Se 381 - lec 23 - 28 - 12 may16 - modularity - ii - cohesionSe 381 - lec 23 - 28 - 12 may16 - modularity - ii - cohesion
Se 381 - lec 23 - 28 - 12 may16 - modularity - ii - cohesion
 
Software Design and Modularity
Software Design and ModularitySoftware Design and Modularity
Software Design and Modularity
 
Software Design abtic.pptx
Software Design abtic.pptxSoftware Design abtic.pptx
Software Design abtic.pptx
 
Software design
Software designSoftware design
Software design
 
CHAPTER 3.pptx
CHAPTER 3.pptxCHAPTER 3.pptx
CHAPTER 3.pptx
 
PMSE pdf
PMSE pdfPMSE pdf
PMSE pdf
 
Software Eng S3 ( Software Design ).pptx
Software Eng S3 ( Software Design ).pptxSoftware Eng S3 ( Software Design ).pptx
Software Eng S3 ( Software Design ).pptx
 
Design concept -Software Engineering
Design concept -Software EngineeringDesign concept -Software Engineering
Design concept -Software Engineering
 
Patterns
PatternsPatterns
Patterns
 
Software design, software engineering
Software design, software engineeringSoftware design, software engineering
Software design, software engineering
 
Fundamental design concepts
Fundamental design conceptsFundamental design concepts
Fundamental design concepts
 
Software engineering Questions and Answers
Software engineering Questions and AnswersSoftware engineering Questions and Answers
Software engineering Questions and Answers
 
Sharbani Bhattacharya SE design & Implementation
Sharbani Bhattacharya SE design & ImplementationSharbani Bhattacharya SE design & Implementation
Sharbani Bhattacharya SE design & Implementation
 
Software architecture 4
Software architecture 4Software architecture 4
Software architecture 4
 
6&8-Design.ppt
6&8-Design.ppt6&8-Design.ppt
6&8-Design.ppt
 
114 425-433
114 425-433114 425-433
114 425-433
 
Lecture 11
Lecture 11Lecture 11
Lecture 11
 
oomd-unit-i-cgpa.ppt
oomd-unit-i-cgpa.pptoomd-unit-i-cgpa.ppt
oomd-unit-i-cgpa.ppt
 
SWE-401 - 5. Software Design Basics
SWE-401 - 5. Software Design BasicsSWE-401 - 5. Software Design Basics
SWE-401 - 5. Software Design Basics
 

More from Dr.Shweta

research ethics , plagiarism checking and removal.pptx
research ethics , plagiarism checking and removal.pptxresearch ethics , plagiarism checking and removal.pptx
research ethics , plagiarism checking and removal.pptxDr.Shweta
 
software design: design fundamentals.pptx
software design: design fundamentals.pptxsoftware design: design fundamentals.pptx
software design: design fundamentals.pptxDr.Shweta
 
Search Algorithms in AI.pptx
Search Algorithms in AI.pptxSearch Algorithms in AI.pptx
Search Algorithms in AI.pptxDr.Shweta
 
Informed search algorithms.pptx
Informed search algorithms.pptxInformed search algorithms.pptx
Informed search algorithms.pptxDr.Shweta
 
constraint satisfaction problems.pptx
constraint satisfaction problems.pptxconstraint satisfaction problems.pptx
constraint satisfaction problems.pptxDr.Shweta
 
review paper publication.pptx
review paper publication.pptxreview paper publication.pptx
review paper publication.pptxDr.Shweta
 
SORTING techniques.pptx
SORTING techniques.pptxSORTING techniques.pptx
SORTING techniques.pptxDr.Shweta
 
Recommended System.pptx
 Recommended System.pptx Recommended System.pptx
Recommended System.pptxDr.Shweta
 
semi supervised Learning and Reinforcement learning (1).pptx
 semi supervised Learning and Reinforcement learning (1).pptx semi supervised Learning and Reinforcement learning (1).pptx
semi supervised Learning and Reinforcement learning (1).pptxDr.Shweta
 
introduction to Statistical Theory.pptx
 introduction to Statistical Theory.pptx introduction to Statistical Theory.pptx
introduction to Statistical Theory.pptxDr.Shweta
 
Unit 2 unsupervised learning.pptx
Unit 2 unsupervised learning.pptxUnit 2 unsupervised learning.pptx
Unit 2 unsupervised learning.pptxDr.Shweta
 
unit 1.2 supervised learning.pptx
unit 1.2 supervised learning.pptxunit 1.2 supervised learning.pptx
unit 1.2 supervised learning.pptxDr.Shweta
 
Introduction of machine learning.pptx
Introduction of machine learning.pptxIntroduction of machine learning.pptx
Introduction of machine learning.pptxDr.Shweta
 
searching techniques.pptx
searching techniques.pptxsearching techniques.pptx
searching techniques.pptxDr.Shweta
 
LINKED LIST.pptx
LINKED LIST.pptxLINKED LIST.pptx
LINKED LIST.pptxDr.Shweta
 
complexity.pptx
complexity.pptxcomplexity.pptx
complexity.pptxDr.Shweta
 
Introduction to Data Science.pptx
Introduction to Data Science.pptxIntroduction to Data Science.pptx
Introduction to Data Science.pptxDr.Shweta
 

More from Dr.Shweta (20)

research ethics , plagiarism checking and removal.pptx
research ethics , plagiarism checking and removal.pptxresearch ethics , plagiarism checking and removal.pptx
research ethics , plagiarism checking and removal.pptx
 
software design: design fundamentals.pptx
software design: design fundamentals.pptxsoftware design: design fundamentals.pptx
software design: design fundamentals.pptx
 
Search Algorithms in AI.pptx
Search Algorithms in AI.pptxSearch Algorithms in AI.pptx
Search Algorithms in AI.pptx
 
Informed search algorithms.pptx
Informed search algorithms.pptxInformed search algorithms.pptx
Informed search algorithms.pptx
 
constraint satisfaction problems.pptx
constraint satisfaction problems.pptxconstraint satisfaction problems.pptx
constraint satisfaction problems.pptx
 
review paper publication.pptx
review paper publication.pptxreview paper publication.pptx
review paper publication.pptx
 
SORTING techniques.pptx
SORTING techniques.pptxSORTING techniques.pptx
SORTING techniques.pptx
 
Recommended System.pptx
 Recommended System.pptx Recommended System.pptx
Recommended System.pptx
 
semi supervised Learning and Reinforcement learning (1).pptx
 semi supervised Learning and Reinforcement learning (1).pptx semi supervised Learning and Reinforcement learning (1).pptx
semi supervised Learning and Reinforcement learning (1).pptx
 
introduction to Statistical Theory.pptx
 introduction to Statistical Theory.pptx introduction to Statistical Theory.pptx
introduction to Statistical Theory.pptx
 
Unit 2 unsupervised learning.pptx
Unit 2 unsupervised learning.pptxUnit 2 unsupervised learning.pptx
Unit 2 unsupervised learning.pptx
 
unit 1.2 supervised learning.pptx
unit 1.2 supervised learning.pptxunit 1.2 supervised learning.pptx
unit 1.2 supervised learning.pptx
 
Introduction of machine learning.pptx
Introduction of machine learning.pptxIntroduction of machine learning.pptx
Introduction of machine learning.pptx
 
searching techniques.pptx
searching techniques.pptxsearching techniques.pptx
searching techniques.pptx
 
LINKED LIST.pptx
LINKED LIST.pptxLINKED LIST.pptx
LINKED LIST.pptx
 
complexity.pptx
complexity.pptxcomplexity.pptx
complexity.pptx
 
queue.pptx
queue.pptxqueue.pptx
queue.pptx
 
STACK.pptx
STACK.pptxSTACK.pptx
STACK.pptx
 
dsa.pptx
dsa.pptxdsa.pptx
dsa.pptx
 
Introduction to Data Science.pptx
Introduction to Data Science.pptxIntroduction to Data Science.pptx
Introduction to Data Science.pptx
 

Recently uploaded

VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girlsssuser7cb4ff
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfAsst.prof M.Gokilavani
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 
power system scada applications and uses
power system scada applications and usespower system scada applications and uses
power system scada applications and usesDevarapalliHaritha
 
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZTE
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 

Recently uploaded (20)

VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girls
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
power system scada applications and uses
power system scada applications and usespower system scada applications and uses
power system scada applications and uses
 
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 

effective modular design.pptx

  • 1. Effective Modular Unit IV Lecture no. 28 By Dr. Shweta Saraswat
  • 2. What is Modular Design? Definition: A design based on modular units that can be assembled in a variety of ways.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8. Now What is Modularity? Definition of Modularity: • Software is divided into separately named an addressable components, called modules, that are integrated to satisfy problem requirements. • The graph shown refers to the question of Modularity and Software Cost, and is a useful tool to consider when modularity is to be implemented. In this graph, the cost or effort drops as more modules are considered, but the cost to interface modules increases as we have more modules. Thus, we must take care to stay in the region of minimum cost, i.e. a balance between the number of modules and the cost or effort.
  • 10. Effective Modular Design • Modularity is an accepted approach in all engineering disciplines • Reduces complexity and facilitates changes in modules • Easier implementation
  • 11. Effective Modular Design • Modularity The real power of partitioning comes if a system is partitioned into modules so that the modules are solvable and modifiable separately. • It will be even better if the modules are also separately compliable (then, changes in a module will not require recompilation of the whole system). • A system is considered modular if it consists of discreet components so that each component can be implemented separately, and a change to one component has minimal impact on other components.
  • 12. Effective Modular Design • Modularity is a clearly a desirable property in a system. • Modularity helps in system debugging. Isolating the system problem to a component is easier if the system is modular. • In system repair, hanging a part of the system is easy as it affects few other parts and in system building, a modular system can be easily built by “putting its modules together.”
  • 13. Effective Modular Design • A software system cannot be made modular by simply chopping it into a set of modules. • For modularity, each module needs to support a well- defined abstraction and have a clear interface through which it can interact with other modules. • Modularity is where abstraction and partitioning come together. • For easily understandable and maintainable systems, modularity is clearly the basic objective; partitioning and abstraction can be viewed as concepts that help achieve modularity.
  • 14. Desirable Characteristics of Module • The attributes of a good module are as follows: • A small program that can be invoked by the operating system, or it could be a sub-program invoked by another module(shareable) • The statement are collectively referred to by a descriptive name called the module name • A module must return to its caller i.e. have a single entry and exit; (single entry and exit module to ensure that modules are closed and simplify program maintenance) • The module should be relatively small in size (small modules allow for more easily amended programs, estimating and project control more accurate and exhaustive testing are easier) • It should be easy to read, modify and use • A module should preferably have a single function
  • 15. Advantages of Modularity • Rationale for Modularity • Allow large program to be written by several or different people • Encourage creation of commonly used routines to be placed in library and/or be used by other programs • Simplify overlay procedure of loading large program into main storage • Provide more check point to measure progress • Simplify design, making program easy to modify and reduce maintenance costs • Provide a framework for more complete testing, easier to test • Produces well-designed and more readable program
  • 16. Disadvantages of Modularity • Rational Against Modularity • Execution time may be, but not necessarily, longer • Storage size may be, but is not necessarily, increased • Compilation and loading time may be longer • Intermodule communication problems may be increased • Demands more initial design time • More linkage required, run-time may be longer, more source lines must be written and more documentation has to be done
  • 17. Top-Down and Bottom-Up Strategies • A system consists of components, which have components of their own; indeed, a system is a hierarchy of components. • The highest-level component corresponds to the total system. • To design such a hierarchy there are two possible approaches: top-down and bottom-up. • The top-down approach starts from the highest-level component of the hierarchy and proceeds to lower levels. • By contrast, a bottom-up approach starts with the lowest- level component of the hierarchy and proceeds through progressively higher levels to the top-level component.
  • 18. Module-Level Concepts • A module is a logically separable part of a program. It is a program unit that is discreet and identifiable with respect to compiling and loading. In terms of common programming language constructs, a module can be a macro, a function, a procedure (or subroutine), a” process, or a package. In systems using functional abstraction, a module is usually a procedure of function or a collection of these. • To produce modular designs, some criteria must be used to select modules so that the modules support well-defined abstractions and are solvable and modifiable separately. In a system using functional abstraction, coupling and cohesion are two modularization criteria, which are often used together.
  • 19. Functional Independence • The concept of functional independence is a direct outgrowth of modularity and the concepts of abstraction and information hiding. • Functional independence is achieved by developing modules with “single- minded’ function and an “aversion” to excessive interaction with other modules. • Stated another way, we want to design software so that each module addresses a specific sub-function of requirements and has a simple interface, when viewed from other parts of the program structure. It is fair to ask, why independence is important. • Software with effective modularity, that is, independent modules, is easier to develop because functions may be compartmentalized and interfaces are simplified (consider the ramifications when development is conducted by a team). • Independent modules are easier to maintain (and test) because secondary effects caused by design or code modification are limited, error propagation is reduced, and reusable modules are possible. • To summarize, functional independence is a key to good design, and design is the key to software quality.
  • 20. Data Structure • Data structure is a representation of the logical relationship among individual elements of data. • Because the structure of information will invariably affect the final procedural design, data structure is as important as program structure to the representation of software architecture. • Data structure dictates the organization, methods of access, degree of associativity, and processing alternatives for information. • Entire texts have been dedicated to these topics, and a complete discussion is beyond the scope of this book. • However, it is important to understand the classic methods available for organizing information and the concepts that underlie information hierarchies.
  • 21. Coupling • A fundamental goal of software design is to structure the software product so that the number and complexity of interconnections between modules is minimized. • An appealing set of heuristics, for achieving this goal, involves the concepts of coupling and cohesion. • Two modules are considered independent if one can function completely without the presence of other. • Obviously, if two modules are independent, they are solvable and modifiable separately. • However, all the modules in a system cannot be independent of each other, as they must interact so that together, they produce the desired external behavior of the system. • The more connections between modules, the more dependent they are in the sense that more knowledge about one module is required to understand or solve the other module. • Hence, the fewer and simpler the connections between modules, the easier it is to understand one without understanding the other. The notion of coupling attempts to capture this concept of “how strongly” different modules are interconnected.
  • 22. Cohesion • The internal cohesion of a module is measured in terms of the strength of binding elements within the module. Cohesion of elements occurs on the scale of weakest (least desirable) to strongest (most desirable). • We have seen that coupling is reduced, when the relationships among elements, in different modules are minimized. That is, coupling is reduced when elements in different modules have little or no bonds between them. Another way of achieving this effect is to strengthen the bond between elements of the same module by maximizing the relationship between elements of the same module. Cohesion is the concept that tries to capture this intramodule. With cohesion, we are interested in determining how closely the elements of a module are related to each other. • Cohesion of a module represents how tightly the internal elements of the module are bound to one another. Cohesion of a module gives the designer an idea about whether the different elements of a module belong together in the same module. Cohesion and coupling are clearly related. Usually, the greater the cohesion of each module in the system, the lower the coupling between modules is. This correlation is not perfect, but it has been observed in practice. There are several levels of cohesion: • Coincidental • Logical • Temporal • Procedural • Communicational • Sequential • Functional
  • 23. Cohesion • Coincidental is the lowest level, and functional is the highest. These levels do not form a linear scale. Functional binding is much stronger than the rest, while the first two are considered much weaker than others. • Coincidental cohesion occurs when there is no meaningful relationship among the elements of a module. Coincidental cohesion can occur if an existing program is “modularized”, by chopping it into pieces and making different piece modules. • A module has logical cohesion if there is some logical relationship between the elements of a module, and the elements perform functions that fall in the same logical class. • Temporal cohesion is the same as logical cohesion, except that the elements are also related in time and are executed together • A procedurally cohesive module contains elements that belong to a common procedural unit. For example, a loop or a sequence of decision statements in a module may be combined to form a separate module. • A module with communicational cohesion has elements that are related by a reference to the same input or output data. • When the elements are together in a module, because the output of one forms the input to another, we get sequential cohesion. • Functional cohesion is the strongest cohesion. In a functionally bound module, all the elements of the module are related to performing a single function.
  • 24. Conclusion • A software system cannot be made modular by simply chopping it into a set of modules. • For modularity, each module needs to support a well- defined abstraction and have a clear interface through which it can interact with other modules. • Modularity is where abstraction and partitioning come together. • For easily understandable and maintainable systems, modularity is clearly the basic objective; partitioning and abstraction can be viewed as concepts that help achieve modularity.