SlideShare ist ein Scribd-Unternehmen logo
1 von 25
SE-381
Software Engineering
BEIT-V
Lecture # 22
(Modularity – I - Coupling)
Program and its Components
– Like all other engineering artifacts, programs
are comprised of components.
– Components can be small or large, but all
communicate with each other to achieve the
goal of the program
– A program can have various program
structures; one having small number of Large
components having few links or another
having large number of Small components
having a large number of links between them
to achieve the assigned goal of the program
Component Size Versus Contact
Interactions or Links
How Large Should be a
Component?
– One page (40-50 statements)?
– Only 5-9 statements long? as a human mind
can store 7 2 items in its active memory – a
research from cognitive and psychological
sciences areas.
– Or in between the two sizes.
– Size of components ∞ (no. of Components) - 1
Modularity
Modules’ Cost Vurses Size
Larger the module size higher the cost and vice versa, overall cost of
system is dependent on other costs as well, like Module Integration cost
Why Modularity?
• Modularity is to partition the software system into
number of components, whereas a Component
could be a method, a class, a package or a
module.
• Modularity is important throughout the SD
including Design and Maintenance.
• Ideally each component should be self
contained and have as few references to other
modules as possible.
• Correlation with other Engineering artifacts
• Modularity has consequences for
– Architectural Design
– Component or Detailed Design
– Debugging
– Testing
– Maintenance
– Independent Development
– Damage Control and
– Software Reuse
Types of Components
• Generically for sake of discussion,
components could be classified as per
their roles as:
– Computation Only (retain no data, math
methods or filters in Unix)
– Memory (persistent data maintenance & use)
– Manager
– Controller
– Link (UI or Main Pipes)
Coupling and Cohesion
• Coupling and Cohesion are the terms that
describe the character of the interaction
between components and within components
respectively.
• These are complimentary.
• Strong Coupling and Weak Cohesion are bad,
Weak Coupling and Strong Cohesion are good
• These terms provide a terminology for
qualitative analysis of Modularity
Coupling and Cohesion
Coupling
• Coupling is the degree of interaction
between two modules.
• It is of 5 types
1. Content Coupling (Bad or Undesirable)
2. Common Coupling
3. Control Coupling
4. Stamp Coupling
5. Data Coupling (Good or the Desirable)
6. Data Stream Coupling (Good and Desirable)
Content Coupling
• The two modules are Content-Coupled if
one can change the others contents
• Earlier programming languages had constructs to
perform such tricky things, but realizing problems
this sort of coupling may cause, these constructs
have been abolished, Eg alter in earlier versions of
COBOL has now been removed. Currently only
Assembly Language can do it.
• Maintainability and reuse problems
Global Data (Common) Coupling
• When two or more modules have (read as
well as write) access to global data they are
said to be Common Coupled
• ‘Common’ comes from FORTRAN COMMON
statement, initiated to relinquish long
parameter lists, and to share data; COMMON
in FORTRAN and global in COBOL-80,
Public data or methods in modern languages
• Problems:
• Most data (Shared data) passed to the modules thru
COMMON blocks not thru the parameter lists, so
modules are difficult to comprehend and read
• Any module having access can change it so difficult to
determine ‘who changed when’ in case of problem, so
difficult to debug and maintain
Common Coupling .
• Data is un-necessarily exposed to modules where it should
not be, thus compromising the Security
• Maintenance changes made in one of the modules to the
declaration (say array size) of a global variable, then that
change has to be made in every module that has access to
that variable
• Common-coupled modules are difficult to reuse, since
identical list of global variables has to be supplied each time
the module is reused
– Despite problems, one can benefit from the gains of
COMMON statement, if applied carefully and
Access levels of different modules to different
blocks are well documented, and the set
guidelines for Common use are strictly
implemented by the Management
Global Data
Common Coupling Example
Control Coupling
• When a module passes control or switch to
another module then it explicitly controls the
logic of the other module, then these are called
as control-coupled modules
– Ex
• Call io (command, device, buffer, length), where command
can have values 0, 1 and 2 for operations read, write and
open
• This called module io and its calling module will be control-
coupled, calling module needs to know the internal structure
of io, or it’s controlling the logic of called module
• Instead io should be replaced by three modules of read, write
and open like
Call read(device, buffer, length)
Control coupling.
• Two modules are not independent, the calling has
to be aware of internal structure and the logic of
the called module, reuse not possible
• Generally Control Coupling is associated with
modules that have logical Cohesion, and so
difficulties with logical cohesion are also present
Stamp Coupling
• Two modules are Stamp-coupled if the calling
module passes on data structure to the called
module, which uses only some individual
components of the data structure
– Eg
• Calculate withholding (employee_record), where
employee_record data structure contains all data related to
employee, his name, contact, qualification, but only salary is
used to calculate withholding
• Insecurity, called module will have access to not
needed data
• Use of data structures as arguments is
recommended provided they are fully used
Data Coupling
• Two modules are data-coupled if all arguments
are homogeneous data items. Every item can
either be a data structure or a simple element,
but should be used in called module
– Ex
• Calculate withholding (employee_salary), where
employee_salary is the salary of employee
• This is the most desired coupling, results in
independent, easily maintainable and re-usable
modules
Stream Coupling
• Passing of a serial data stream,
• This is the weakest or the best coupling
achieved without any transfer of control between
components.
• It is like one component is out puting information
to a serial file and other component is reading
from there.
• New languages like Java have library functions
like java.io.PipedInputStream and
java.io.PipedOutputStream; Ada also have
similar constructs
Coupling Example
References
1. Douglas Bell (2005); Software Engineering for Students; 4th
Edition, Pearson Education, Ch-6, Modularity, pp 67-86
2. Stephen R Schach (2007); Software Engineering, 7th Edition,
Tata McGraw-Hill Publishing Company Limited, New Delhi,
Ch-7 From Modules to Objects, pp 177 - 218
3. Pankaje Jalote (2004); An Integrated Approach to Software
Engineering, 2nd Edition; Narosa Publishing House, New Delhi;
Ch – 5
4. S A Kelkar (2007); Software Engineering – A Concise Study;
Prentice-Hall of India, New Delhi, pp 548-550

Weitere ähnliche Inhalte

Was ist angesagt?

Software Design
Software DesignSoftware Design
Software DesignHa Ninh
 
Software Design 1: Coupling & cohesion
Software Design 1: Coupling & cohesionSoftware Design 1: Coupling & cohesion
Software Design 1: Coupling & cohesionAttila Magyar
 
Pressman ch-11-component-level-design
Pressman ch-11-component-level-designPressman ch-11-component-level-design
Pressman ch-11-component-level-designOliver Cheng
 
Unit iii(part d - component level design)
Unit   iii(part d - component level design)Unit   iii(part d - component level design)
Unit iii(part d - component level design)BALAJI A
 
Design process and concepts
Design process and conceptsDesign process and concepts
Design process and conceptsSlideshare
 
Pressman ch-11-component-level-design
Pressman ch-11-component-level-designPressman ch-11-component-level-design
Pressman ch-11-component-level-designOliver Cheng
 
Software Design and Modularity
Software Design and ModularitySoftware Design and Modularity
Software Design and ModularityDanyal Ahmad
 
Software design principles
Software design principlesSoftware design principles
Software design principlesRitesh Singh
 
Chapter 4 software design
Chapter 4  software designChapter 4  software design
Chapter 4 software designCliftone Mullah
 
Design Concept software engineering
Design Concept software engineeringDesign Concept software engineering
Design Concept software engineeringDarshit Metaliya
 
Coupling and cohesion
Coupling and cohesionCoupling and cohesion
Coupling and cohesionSutha31
 
Cohesion and coupling in software design
Cohesion and coupling in software designCohesion and coupling in software design
Cohesion and coupling in software designAhmed Saad Khames
 
Design concepts and principles
Design concepts and principlesDesign concepts and principles
Design concepts and principlessaurabhshertukde
 
Coupling coheshion tps
Coupling coheshion tpsCoupling coheshion tps
Coupling coheshion tpsPreeti Mishra
 
Software Designing - Software Engineering
Software Designing - Software EngineeringSoftware Designing - Software Engineering
Software Designing - Software EngineeringPurvik Rana
 
Function oriented design
Function oriented designFunction oriented design
Function oriented designVidhun T
 
Slides chapters 28-32
Slides chapters 28-32Slides chapters 28-32
Slides chapters 28-32Priyanka Shetty
 

Was ist angesagt? (20)

Software Design
Software DesignSoftware Design
Software Design
 
Software Design 1: Coupling & cohesion
Software Design 1: Coupling & cohesionSoftware Design 1: Coupling & cohesion
Software Design 1: Coupling & cohesion
 
Design final
Design finalDesign final
Design final
 
Pressman ch-11-component-level-design
Pressman ch-11-component-level-designPressman ch-11-component-level-design
Pressman ch-11-component-level-design
 
Unit iii(part d - component level design)
Unit   iii(part d - component level design)Unit   iii(part d - component level design)
Unit iii(part d - component level design)
 
Design process and concepts
Design process and conceptsDesign process and concepts
Design process and concepts
 
Pressman ch-11-component-level-design
Pressman ch-11-component-level-designPressman ch-11-component-level-design
Pressman ch-11-component-level-design
 
Software Design and Modularity
Software Design and ModularitySoftware Design and Modularity
Software Design and Modularity
 
Design Principles
Design PrinciplesDesign Principles
Design Principles
 
Software design principles
Software design principlesSoftware design principles
Software design principles
 
Chapter 4 software design
Chapter 4  software designChapter 4  software design
Chapter 4 software design
 
Design Concept software engineering
Design Concept software engineeringDesign Concept software engineering
Design Concept software engineering
 
Coupling and cohesion
Coupling and cohesionCoupling and cohesion
Coupling and cohesion
 
Cohesion and coupling in software design
Cohesion and coupling in software designCohesion and coupling in software design
Cohesion and coupling in software design
 
Design concepts and principles
Design concepts and principlesDesign concepts and principles
Design concepts and principles
 
Coupling coheshion tps
Coupling coheshion tpsCoupling coheshion tps
Coupling coheshion tps
 
SE UNIT-3.pdf
SE UNIT-3.pdfSE UNIT-3.pdf
SE UNIT-3.pdf
 
Software Designing - Software Engineering
Software Designing - Software EngineeringSoftware Designing - Software Engineering
Software Designing - Software Engineering
 
Function oriented design
Function oriented designFunction oriented design
Function oriented design
 
Slides chapters 28-32
Slides chapters 28-32Slides chapters 28-32
Slides chapters 28-32
 

Ähnlich wie Se 381 - lec 22 - 24 - 12 may15 - modularity - i - coupling

System software design1
System software design1System software design1
System software design1PrityRawat2
 
effective modular design.pptx
effective modular design.pptxeffective modular design.pptx
effective modular design.pptxDr.Shweta
 
EFFECTIVE MODULAR DESIGN.pptx
EFFECTIVE MODULAR DESIGN.pptxEFFECTIVE MODULAR DESIGN.pptx
EFFECTIVE MODULAR DESIGN.pptxDrTThendralCompSci
 
Unit-III(Design).pptx
Unit-III(Design).pptxUnit-III(Design).pptx
Unit-III(Design).pptxFajar Baskoro
 
Sharbani Bhattacharya SE design & Implementation
Sharbani Bhattacharya SE design & ImplementationSharbani Bhattacharya SE design & Implementation
Sharbani Bhattacharya SE design & ImplementationSharbani Bhattacharya
 
Software Eng S3 ( Software Design ).pptx
Software Eng S3 ( Software Design ).pptxSoftware Eng S3 ( Software Design ).pptx
Software Eng S3 ( Software Design ).pptxgauriVarshney8
 
2.Modular Design.pptx
2.Modular Design.pptx2.Modular Design.pptx
2.Modular Design.pptxREALGROUPS
 
Fundamental design concepts
Fundamental design conceptsFundamental design concepts
Fundamental design conceptssrijavel
 
Modules and modularization criteria
Modules and modularization criteriaModules and modularization criteria
Modules and modularization criteriaUmaselvi_R
 
Software engineering
Software engineeringSoftware engineering
Software engineeringMuhammad Yasir
 
Software design, software engineering
Software design, software engineeringSoftware design, software engineering
Software design, software engineeringRupesh Vaishnav
 
software engineering
software engineeringsoftware engineering
software engineeringAbinaya B
 
System design process.pptx
System design process.pptxSystem design process.pptx
System design process.pptxNajibMuhammad16
 
software engineering
software engineeringsoftware engineering
software engineeringVijay Bhadouria
 
Software engineering Questions and Answers
Software engineering Questions and AnswersSoftware engineering Questions and Answers
Software engineering Questions and AnswersBala Ganesh
 
CHAPTER 3.pptx
CHAPTER 3.pptxCHAPTER 3.pptx
CHAPTER 3.pptxSRKkkr1
 
How effective is modularization
How effective is modularizationHow effective is modularization
How effective is modularizationSyedArsal
 
Software Design abtic.pptx
Software Design abtic.pptxSoftware Design abtic.pptx
Software Design abtic.pptxssuser8c0d24
 

Ähnlich wie Se 381 - lec 22 - 24 - 12 may15 - modularity - i - coupling (20)

System software design1
System software design1System software design1
System software design1
 
effective modular design.pptx
effective modular design.pptxeffective modular design.pptx
effective modular design.pptx
 
EFFECTIVE MODULAR DESIGN.pptx
EFFECTIVE MODULAR DESIGN.pptxEFFECTIVE MODULAR DESIGN.pptx
EFFECTIVE MODULAR DESIGN.pptx
 
Unit 2
Unit 2Unit 2
Unit 2
 
Unit-III(Design).pptx
Unit-III(Design).pptxUnit-III(Design).pptx
Unit-III(Design).pptx
 
Sharbani Bhattacharya SE design & Implementation
Sharbani Bhattacharya SE design & ImplementationSharbani Bhattacharya SE design & Implementation
Sharbani Bhattacharya SE design & Implementation
 
Software Eng S3 ( Software Design ).pptx
Software Eng S3 ( Software Design ).pptxSoftware Eng S3 ( Software Design ).pptx
Software Eng S3 ( Software Design ).pptx
 
2.Modular Design.pptx
2.Modular Design.pptx2.Modular Design.pptx
2.Modular Design.pptx
 
Fundamental design concepts
Fundamental design conceptsFundamental design concepts
Fundamental design concepts
 
Modules and modularization criteria
Modules and modularization criteriaModules and modularization criteria
Modules and modularization criteria
 
Software engineering
Software engineeringSoftware engineering
Software engineering
 
Software design, software engineering
Software design, software engineeringSoftware design, software engineering
Software design, software engineering
 
software engineering
software engineeringsoftware engineering
software engineering
 
System design process.pptx
System design process.pptxSystem design process.pptx
System design process.pptx
 
software engineering
software engineeringsoftware engineering
software engineering
 
Software engineering Questions and Answers
Software engineering Questions and AnswersSoftware engineering Questions and Answers
Software engineering Questions and Answers
 
CHAPTER 3.pptx
CHAPTER 3.pptxCHAPTER 3.pptx
CHAPTER 3.pptx
 
Software Design - SDLC Model
Software Design - SDLC ModelSoftware Design - SDLC Model
Software Design - SDLC Model
 
How effective is modularization
How effective is modularizationHow effective is modularization
How effective is modularization
 
Software Design abtic.pptx
Software Design abtic.pptxSoftware Design abtic.pptx
Software Design abtic.pptx
 

Mehr von babak danyal

Easy Steps to implement UDP Server and Client Sockets
Easy Steps to implement UDP Server and Client SocketsEasy Steps to implement UDP Server and Client Sockets
Easy Steps to implement UDP Server and Client Socketsbabak danyal
 
Java IO Package and Streams
Java IO Package and StreamsJava IO Package and Streams
Java IO Package and Streamsbabak danyal
 
Swing and Graphical User Interface in Java
Swing and Graphical User Interface in JavaSwing and Graphical User Interface in Java
Swing and Graphical User Interface in Javababak danyal
 
block ciphers and the des
block ciphers and the desblock ciphers and the des
block ciphers and the desbabak danyal
 
key distribution in network security
key distribution in network securitykey distribution in network security
key distribution in network securitybabak danyal
 
Lecture10 Signal and Systems
Lecture10 Signal and SystemsLecture10 Signal and Systems
Lecture10 Signal and Systemsbabak danyal
 
Lecture8 Signal and Systems
Lecture8 Signal and SystemsLecture8 Signal and Systems
Lecture8 Signal and Systemsbabak danyal
 
Lecture7 Signal and Systems
Lecture7 Signal and SystemsLecture7 Signal and Systems
Lecture7 Signal and Systemsbabak danyal
 
Lecture6 Signal and Systems
Lecture6 Signal and SystemsLecture6 Signal and Systems
Lecture6 Signal and Systemsbabak danyal
 
Lecture5 Signal and Systems
Lecture5 Signal and SystemsLecture5 Signal and Systems
Lecture5 Signal and Systemsbabak danyal
 
Lecture4 Signal and Systems
Lecture4  Signal and SystemsLecture4  Signal and Systems
Lecture4 Signal and Systemsbabak danyal
 
Lecture3 Signal and Systems
Lecture3 Signal and SystemsLecture3 Signal and Systems
Lecture3 Signal and Systemsbabak danyal
 
Lecture2 Signal and Systems
Lecture2 Signal and SystemsLecture2 Signal and Systems
Lecture2 Signal and Systemsbabak danyal
 
Lecture1 Intro To Signa
Lecture1 Intro To SignaLecture1 Intro To Signa
Lecture1 Intro To Signababak danyal
 
Lecture9 Signal and Systems
Lecture9 Signal and SystemsLecture9 Signal and Systems
Lecture9 Signal and Systemsbabak danyal
 
Cns 13f-lec03- Classical Encryption Techniques
Cns 13f-lec03- Classical Encryption TechniquesCns 13f-lec03- Classical Encryption Techniques
Cns 13f-lec03- Classical Encryption Techniquesbabak danyal
 
Classical Encryption Techniques in Network Security
Classical Encryption Techniques in Network SecurityClassical Encryption Techniques in Network Security
Classical Encryption Techniques in Network Securitybabak danyal
 

Mehr von babak danyal (20)

applist
applistapplist
applist
 
Easy Steps to implement UDP Server and Client Sockets
Easy Steps to implement UDP Server and Client SocketsEasy Steps to implement UDP Server and Client Sockets
Easy Steps to implement UDP Server and Client Sockets
 
Java IO Package and Streams
Java IO Package and StreamsJava IO Package and Streams
Java IO Package and Streams
 
Swing and Graphical User Interface in Java
Swing and Graphical User Interface in JavaSwing and Graphical User Interface in Java
Swing and Graphical User Interface in Java
 
Tcp sockets
Tcp socketsTcp sockets
Tcp sockets
 
block ciphers and the des
block ciphers and the desblock ciphers and the des
block ciphers and the des
 
key distribution in network security
key distribution in network securitykey distribution in network security
key distribution in network security
 
Lecture10 Signal and Systems
Lecture10 Signal and SystemsLecture10 Signal and Systems
Lecture10 Signal and Systems
 
Lecture8 Signal and Systems
Lecture8 Signal and SystemsLecture8 Signal and Systems
Lecture8 Signal and Systems
 
Lecture7 Signal and Systems
Lecture7 Signal and SystemsLecture7 Signal and Systems
Lecture7 Signal and Systems
 
Lecture6 Signal and Systems
Lecture6 Signal and SystemsLecture6 Signal and Systems
Lecture6 Signal and Systems
 
Lecture5 Signal and Systems
Lecture5 Signal and SystemsLecture5 Signal and Systems
Lecture5 Signal and Systems
 
Lecture4 Signal and Systems
Lecture4  Signal and SystemsLecture4  Signal and Systems
Lecture4 Signal and Systems
 
Lecture3 Signal and Systems
Lecture3 Signal and SystemsLecture3 Signal and Systems
Lecture3 Signal and Systems
 
Lecture2 Signal and Systems
Lecture2 Signal and SystemsLecture2 Signal and Systems
Lecture2 Signal and Systems
 
Lecture1 Intro To Signa
Lecture1 Intro To SignaLecture1 Intro To Signa
Lecture1 Intro To Signa
 
Lecture9 Signal and Systems
Lecture9 Signal and SystemsLecture9 Signal and Systems
Lecture9 Signal and Systems
 
Lecture9
Lecture9Lecture9
Lecture9
 
Cns 13f-lec03- Classical Encryption Techniques
Cns 13f-lec03- Classical Encryption TechniquesCns 13f-lec03- Classical Encryption Techniques
Cns 13f-lec03- Classical Encryption Techniques
 
Classical Encryption Techniques in Network Security
Classical Encryption Techniques in Network SecurityClassical Encryption Techniques in Network Security
Classical Encryption Techniques in Network Security
 

KĂźrzlich hochgeladen

ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptxSherlyMaeNeri
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfTechSoup
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxCarlos105
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYKayeClaireEstoconing
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
Q4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptxQ4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptxnelietumpap1
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxMaryGraceBautista27
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 

KĂźrzlich hochgeladen (20)

ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptx
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
Q4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptxQ4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptx
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptx
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 

Se 381 - lec 22 - 24 - 12 may15 - modularity - i - coupling

  • 1. SE-381 Software Engineering BEIT-V Lecture # 22 (Modularity – I - Coupling)
  • 2. Program and its Components – Like all other engineering artifacts, programs are comprised of components. – Components can be small or large, but all communicate with each other to achieve the goal of the program – A program can have various program structures; one having small number of Large components having few links or another having large number of Small components having a large number of links between them to achieve the assigned goal of the program
  • 3. Component Size Versus Contact Interactions or Links
  • 4. How Large Should be a Component? – One page (40-50 statements)? – Only 5-9 statements long? as a human mind can store 7 2 items in its active memory – a research from cognitive and psychological sciences areas. – Or in between the two sizes. – Size of components ∞ (no. of Components) - 1
  • 5. Modularity Modules’ Cost Vurses Size Larger the module size higher the cost and vice versa, overall cost of system is dependent on other costs as well, like Module Integration cost
  • 6.
  • 7. Why Modularity? • Modularity is to partition the software system into number of components, whereas a Component could be a method, a class, a package or a module. • Modularity is important throughout the SD including Design and Maintenance. • Ideally each component should be self contained and have as few references to other modules as possible. • Correlation with other Engineering artifacts
  • 8. • Modularity has consequences for – Architectural Design – Component or Detailed Design – Debugging – Testing – Maintenance – Independent Development – Damage Control and – Software Reuse
  • 9. Types of Components • Generically for sake of discussion, components could be classified as per their roles as: – Computation Only (retain no data, math methods or filters in Unix) – Memory (persistent data maintenance & use) – Manager – Controller – Link (UI or Main Pipes)
  • 10. Coupling and Cohesion • Coupling and Cohesion are the terms that describe the character of the interaction between components and within components respectively. • These are complimentary. • Strong Coupling and Weak Cohesion are bad, Weak Coupling and Strong Cohesion are good • These terms provide a terminology for qualitative analysis of Modularity
  • 12. Coupling • Coupling is the degree of interaction between two modules. • It is of 5 types 1. Content Coupling (Bad or Undesirable) 2. Common Coupling 3. Control Coupling 4. Stamp Coupling 5. Data Coupling (Good or the Desirable) 6. Data Stream Coupling (Good and Desirable)
  • 13. Content Coupling • The two modules are Content-Coupled if one can change the others contents • Earlier programming languages had constructs to perform such tricky things, but realizing problems this sort of coupling may cause, these constructs have been abolished, Eg alter in earlier versions of COBOL has now been removed. Currently only Assembly Language can do it. • Maintainability and reuse problems
  • 14. Global Data (Common) Coupling • When two or more modules have (read as well as write) access to global data they are said to be Common Coupled • ‘Common’ comes from FORTRAN COMMON statement, initiated to relinquish long parameter lists, and to share data; COMMON in FORTRAN and global in COBOL-80, Public data or methods in modern languages • Problems: • Most data (Shared data) passed to the modules thru COMMON blocks not thru the parameter lists, so modules are difficult to comprehend and read • Any module having access can change it so difficult to determine ‘who changed when’ in case of problem, so difficult to debug and maintain
  • 15. Common Coupling . • Data is un-necessarily exposed to modules where it should not be, thus compromising the Security • Maintenance changes made in one of the modules to the declaration (say array size) of a global variable, then that change has to be made in every module that has access to that variable • Common-coupled modules are difficult to reuse, since identical list of global variables has to be supplied each time the module is reused – Despite problems, one can benefit from the gains of COMMON statement, if applied carefully and Access levels of different modules to different blocks are well documented, and the set guidelines for Common use are strictly implemented by the Management
  • 18. Control Coupling • When a module passes control or switch to another module then it explicitly controls the logic of the other module, then these are called as control-coupled modules – Ex • Call io (command, device, buffer, length), where command can have values 0, 1 and 2 for operations read, write and open • This called module io and its calling module will be control- coupled, calling module needs to know the internal structure of io, or it’s controlling the logic of called module • Instead io should be replaced by three modules of read, write and open like Call read(device, buffer, length)
  • 19. Control coupling. • Two modules are not independent, the calling has to be aware of internal structure and the logic of the called module, reuse not possible • Generally Control Coupling is associated with modules that have logical Cohesion, and so difficulties with logical cohesion are also present
  • 20. Stamp Coupling • Two modules are Stamp-coupled if the calling module passes on data structure to the called module, which uses only some individual components of the data structure – Eg • Calculate withholding (employee_record), where employee_record data structure contains all data related to employee, his name, contact, qualification, but only salary is used to calculate withholding • Insecurity, called module will have access to not needed data • Use of data structures as arguments is recommended provided they are fully used
  • 21. Data Coupling • Two modules are data-coupled if all arguments are homogeneous data items. Every item can either be a data structure or a simple element, but should be used in called module – Ex • Calculate withholding (employee_salary), where employee_salary is the salary of employee • This is the most desired coupling, results in independent, easily maintainable and re-usable modules
  • 22. Stream Coupling • Passing of a serial data stream, • This is the weakest or the best coupling achieved without any transfer of control between components. • It is like one component is out puting information to a serial file and other component is reading from there. • New languages like Java have library functions like java.io.PipedInputStream and java.io.PipedOutputStream; Ada also have similar constructs
  • 24.
  • 25. References 1. Douglas Bell (2005); Software Engineering for Students; 4th Edition, Pearson Education, Ch-6, Modularity, pp 67-86 2. Stephen R Schach (2007); Software Engineering, 7th Edition, Tata McGraw-Hill Publishing Company Limited, New Delhi, Ch-7 From Modules to Objects, pp 177 - 218 3. Pankaje Jalote (2004); An Integrated Approach to Software Engineering, 2nd Edition; Narosa Publishing House, New Delhi; Ch – 5 4. S A Kelkar (2007); Software Engineering – A Concise Study; Prentice-Hall of India, New Delhi, pp 548-550