SlideShare a Scribd company logo
1 of 35
By:
Altaf Hussain
SSO, KRL
Low Coupling
Problem: How to support dependency, low change impact
and increased reuse?
Solution: Assign responsibility so that coupling remain
low. Use the principle to evaluate the alternative
Low Coupling
Coupling is a measure how strongly one element is
connected to, has knowledge of other element. An
element with low (or weak) coupling is not dependent
on too many other elements. These elements include
classes, systems, subsystems and so on. High coupling
elements have problems:
Forced local changes because of changes in related
classes
Harder to understand in isolation
Harder to reuse because its use requires the additional
presence of the classes on which it is dependent.
Low Coupling
Low Coupling
In OOP languages like C#, C++ or Java, common forms of
coupling from Object X to Y includes the followings:
X has attributes (data members or instance variables) that
refers to a Y instance or Y itself.
A X object calls on services of a type Y.
X has a method that references an instances of Y. These
typically include a parameter or local variable of Y or the
object returned from a message being an instance of Y.
X is direct or indirect subclass of Y
Y is an interface and X implements that interface
Controller
Problem: What first object beyond the User Interface layer
receives and coordinates (Controls) a system operation?
System Operations were first explored during the analysis
of SSD. These are the major input events upon our system.
For example, when a cashier using POS terminal presses the
End Sale button, he is generating a system event indicating
the Sale has ended. Similarly when writer using a word
processor presses the Spell Check button, he is generating a
system event indicating to perform a spell check.
Controller is the first object beyond the UI layer that is
responsible for receiving and handling system operation
message.
Controller
Controller
Controller
Controller
High Cohesion
Problem: How to keep objects focused,
understandable, and manageable, and as a side effect
support low coupling?
Solution: Assign responsibility so that cohesion remain
high. Use the principle to evaluate the alternative
Cohesion ?
Cohesion or Coherence is the strength of
dependencies within a subsystem.
Cohesion is a measure of how related the functions
performed by a software component are.
Cohesion is the "glue" that holds a module together.
Cohesion is about making sure each component does
one thing and does it well. (Cohesion Test)
In a highly cohesive subsystem:
subsystem contains related objects
all elements are directed toward and essential for
performing the same task.
A class with low cohesion does many unrelated and
does to many things
High Cohesion
Supporting Discussion on High Cohesion

More Related Content

Viewers also liked

Viewers also liked (10)

ASP.NET MVC - как построить по-настоящему гибкое веб-приложение
ASP.NET MVC - как построить по-настоящему гибкое веб-приложениеASP.NET MVC - как построить по-настоящему гибкое веб-приложение
ASP.NET MVC - как построить по-настоящему гибкое веб-приложение
 
Assic 10th Lecture
Assic 10th LectureAssic 10th Lecture
Assic 10th Lecture
 
Assic 5th Lecture
Assic 5th LectureAssic 5th Lecture
Assic 5th Lecture
 
Assic Lecture 31st
Assic Lecture 31stAssic Lecture 31st
Assic Lecture 31st
 
Se 381 - lec 28 -- 34 - 12 jun12 - testing 1 of 2
Se 381 -  lec 28 -- 34 - 12 jun12 - testing 1 of 2Se 381 -  lec 28 -- 34 - 12 jun12 - testing 1 of 2
Se 381 - lec 28 -- 34 - 12 jun12 - testing 1 of 2
 
Assic 14th Lecture
Assic 14th LectureAssic 14th Lecture
Assic 14th Lecture
 
Satcom 5
Satcom 5Satcom 5
Satcom 5
 
04 image enhancement in spatial domain DIP
04 image enhancement in spatial domain DIP04 image enhancement in spatial domain DIP
04 image enhancement in spatial domain DIP
 
Beit 381 se lec 11,12 - 41 - 12 mar16 - 3 & 4 of 4 - sdlc incremental and ...
Beit 381 se lec 11,12  -  41 -  12 mar16 - 3 & 4 of 4 - sdlc incremental and ...Beit 381 se lec 11,12  -  41 -  12 mar16 - 3 & 4 of 4 - sdlc incremental and ...
Beit 381 se lec 11,12 - 41 - 12 mar16 - 3 & 4 of 4 - sdlc incremental and ...
 
Quaid-e-Azam and Early Problems of Pakistan
Quaid-e-Azam and Early Problems of PakistanQuaid-e-Azam and Early Problems of Pakistan
Quaid-e-Azam and Early Problems of Pakistan
 

Similar to Mvc grasp

Object oriented software engineering
Object oriented software engineeringObject oriented software engineering
Object oriented software engineering
Varsha Ajith
 
Ooad 2marks
Ooad 2marksOoad 2marks
Ooad 2marks
Ash Wini
 
Function oriented design
Function oriented designFunction oriented design
Function oriented design
Vidhun T
 
1.[1 8]an affective decision making engine framework for practical software a...
1.[1 8]an affective decision making engine framework for practical software a...1.[1 8]an affective decision making engine framework for practical software a...
1.[1 8]an affective decision making engine framework for practical software a...
Alexander Decker
 
07 software design
07   software design07   software design
07 software design
kebsterz
 
07 software design
07   software design07   software design
07 software design
kebsterz
 
Software engg. pressman_ch-8
Software engg. pressman_ch-8Software engg. pressman_ch-8
Software engg. pressman_ch-8
Dhairya Joshi
 
Bus 304 lecture 4-intro system concepts
Bus 304 lecture 4-intro system  conceptsBus 304 lecture 4-intro system  concepts
Bus 304 lecture 4-intro system concepts
eduafo
 
An agent based approach for building complex software systems
An agent based approach for building complex software systemsAn agent based approach for building complex software systems
An agent based approach for building complex software systems
Icaro Santos
 

Similar to Mvc grasp (20)

Grasp
GraspGrasp
Grasp
 
Object oriented software engineering
Object oriented software engineeringObject oriented software engineering
Object oriented software engineering
 
On the Role of Perception and Apperception in Ubiquitous and Pervasive Enviro...
On the Role of Perception and Apperception in Ubiquitous and Pervasive Enviro...On the Role of Perception and Apperception in Ubiquitous and Pervasive Enviro...
On the Role of Perception and Apperception in Ubiquitous and Pervasive Enviro...
 
Software Design abtic.pptx
Software Design abtic.pptxSoftware Design abtic.pptx
Software Design abtic.pptx
 
Otcaosr v2.4
Otcaosr v2.4Otcaosr v2.4
Otcaosr v2.4
 
On the Role of Perception and Apperception in Ubiquitous and Pervasive Enviro...
On the Role of Perception and Apperception in Ubiquitous and Pervasive Enviro...On the Role of Perception and Apperception in Ubiquitous and Pervasive Enviro...
On the Role of Perception and Apperception in Ubiquitous and Pervasive Enviro...
 
Ooad 2marks
Ooad 2marksOoad 2marks
Ooad 2marks
 
Function oriented design
Function oriented designFunction oriented design
Function oriented design
 
1.[1 8]an affective decision making engine framework for practical software a...
1.[1 8]an affective decision making engine framework for practical software a...1.[1 8]an affective decision making engine framework for practical software a...
1.[1 8]an affective decision making engine framework for practical software a...
 
1.[1 8]an affective decision making engine framework for practical software a...
1.[1 8]an affective decision making engine framework for practical software a...1.[1 8]an affective decision making engine framework for practical software a...
1.[1 8]an affective decision making engine framework for practical software a...
 
07 software design
07   software design07   software design
07 software design
 
07 software design
07   software design07   software design
07 software design
 
Managing application-state-final
Managing application-state-finalManaging application-state-final
Managing application-state-final
 
system
systemsystem
system
 
System analysis and design
System analysis and designSystem analysis and design
System analysis and design
 
17 slide grasp
17 slide grasp17 slide grasp
17 slide grasp
 
Processes and threads
Processes and threadsProcesses and threads
Processes and threads
 
Software engg. pressman_ch-8
Software engg. pressman_ch-8Software engg. pressman_ch-8
Software engg. pressman_ch-8
 
Bus 304 lecture 4-intro system concepts
Bus 304 lecture 4-intro system  conceptsBus 304 lecture 4-intro system  concepts
Bus 304 lecture 4-intro system concepts
 
An agent based approach for building complex software systems
An agent based approach for building complex software systemsAn agent based approach for building complex software systems
An agent based approach for building complex software systems
 

More from babak danyal

Lecture1 Intro To Signa
Lecture1 Intro To SignaLecture1 Intro To Signa
Lecture1 Intro To Signa
babak danyal
 

More from 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
 

Recently uploaded

1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
heathfieldcps1
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 

Recently uploaded (20)

BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 

Mvc grasp

  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23. Low Coupling Problem: How to support dependency, low change impact and increased reuse? Solution: Assign responsibility so that coupling remain low. Use the principle to evaluate the alternative
  • 24. Low Coupling Coupling is a measure how strongly one element is connected to, has knowledge of other element. An element with low (or weak) coupling is not dependent on too many other elements. These elements include classes, systems, subsystems and so on. High coupling elements have problems: Forced local changes because of changes in related classes Harder to understand in isolation Harder to reuse because its use requires the additional presence of the classes on which it is dependent.
  • 26. Low Coupling In OOP languages like C#, C++ or Java, common forms of coupling from Object X to Y includes the followings: X has attributes (data members or instance variables) that refers to a Y instance or Y itself. A X object calls on services of a type Y. X has a method that references an instances of Y. These typically include a parameter or local variable of Y or the object returned from a message being an instance of Y. X is direct or indirect subclass of Y Y is an interface and X implements that interface
  • 27. Controller Problem: What first object beyond the User Interface layer receives and coordinates (Controls) a system operation? System Operations were first explored during the analysis of SSD. These are the major input events upon our system. For example, when a cashier using POS terminal presses the End Sale button, he is generating a system event indicating the Sale has ended. Similarly when writer using a word processor presses the Spell Check button, he is generating a system event indicating to perform a spell check. Controller is the first object beyond the UI layer that is responsible for receiving and handling system operation message.
  • 32. High Cohesion Problem: How to keep objects focused, understandable, and manageable, and as a side effect support low coupling? Solution: Assign responsibility so that cohesion remain high. Use the principle to evaluate the alternative
  • 33. Cohesion ? Cohesion or Coherence is the strength of dependencies within a subsystem. Cohesion is a measure of how related the functions performed by a software component are. Cohesion is the "glue" that holds a module together. Cohesion is about making sure each component does one thing and does it well. (Cohesion Test) In a highly cohesive subsystem: subsystem contains related objects all elements are directed toward and essential for performing the same task. A class with low cohesion does many unrelated and does to many things
  • 35. Supporting Discussion on High Cohesion