SlideShare una empresa de Scribd logo
1 de 4
Descargar para leer sin conexión
Software Architecture
(Assignment – 3)
By
Farwa Abdul Hannan
(16F-9006)
Fast – National University of Computer & Emerging Sciences
Page | 1
Software Design Patterns
Summary
A design pattern is a general reusable solution to a commonly occurring problem in software
design. A design pattern is not a finished design that can be transformed directly into code instead
it is a description or template for how to solve a problem that can be used in many different
situations. Object-oriented design patterns typically show relationships and interactions between
classes or objects, without specifying the final application classes or objects that are involved. At
a higher level there are architectural patterns that are larger in scope, usually describing an overall
pattern followed by an entire system. Design patterns are a powerful tool for software developers.
Originally, design patterns were grouped in to the 3 categories: creational patterns, structural
patterns, and behavioral patterns.
Creational design patterns deal with the mechanism of object creation and trying to create the
object in such a way that they are suitable to the situation. The creational patterns aim to separate
a system from how its objects are created, composed, and represented. They increase the system's
flexibility in terms of the what, who, how, and when of object creation. The basic form of object
creation could result in design problems or in added complexity to the design. Creational design
patterns solve this problem by somehow controlling this object creation. These design patterns
consist of 2 main ideas i.e. encapsulating knowledge about which concrete classes the system uses
and hiding the detail related to how instances of these concrete classes are created and combined.
Creational design patterns are further categorized into Object-creational patterns and Class-
creational patterns. Object-creational patterns deal with Object creation and Class-creational
patterns deal with Class-instantiation. Also that Object-creational patterns defer part of its object
creation to another object, while Class-creational patterns defer its object creation to subclasses.
There are five more patterns that are the part of the creational design patterns. These five patterns
are Abstract factory pattern, which provides an interface for creating related or dependent objects
without specifying the concrete classes of objects, Builder pattern, which separates the
construction of a complex object from its representation so that the same construction process can
create different representations, Factory method pattern, which allows a class to defer instantiation
to subclasses, Prototype pattern, which specifies the kind of object to create using a prototypical
Page | 2
instance, and creates new objects by cloning this prototype, Singleton pattern, which ensures that
a class only has one instance, and provides a global point of access to it.
The second type of design pattern is the structural pattern. Structural patterns provide a manner to
define relationships between classes or objects. These design patterns are all about Class and
Object composition. Structural object-patterns define ways to compose objects to obtain new
functionality. Concept of inheritance is used to compose interfaces and define ways to compose
objects to obtain new functionalities. These design patterns contains multiple parts like adapter,
bridge, composite, decorator, facade, flyweight, private class data and proxy. Adapter or Wrapper
converts the interface of a class into another interface clients expect. Adapter lets classes work
together that could not otherwise because of incompatible interfaces. Bridge decouple an
abstraction from its implementation allowing the two to vary independently. Composite compose
objects into tree structures to represent part-whole hierarchies. Composite lets clients treat
individual objects and compositions of objects uniformly. Decorator attach additional
responsibilities to an object dynamically keeping the same interface. Decorators provide a flexible
alternative to subclassing for extending functionality. Facade provide a unified interface to a set
of interfaces in a subsystem. Facade defines a higher-level interface that makes the subsystem
easier to use. Front Controller provide a unified interface to a set of interfaces in a subsystem.
Front Controller defines a higher-level interface that makes the subsystem easier to use. Flyweight
use sharing to support large numbers of fine-grained objects efficiently. Proxy provide a surrogate
or placeholder for another object to control access to it.
The final type of design pattern is the behavioral pattern. Behavioral patterns define manners of
communication between classes and objects. These design patterns are all about Class's objects
communication. Behavioral patterns are those patterns that are most specifically concerned with
communication between objects. They identify common communication patterns between objects
and realize these patterns. By doing so, these patterns increase flexibility in carrying out this
communication. Behavioral patterns consists of twelve patterns that are the part of these behavioral
patterns and they are Chain of responsibility, Command, Interpreter, Iterator, Mediator, Memento,
Null Object, Observer, State, Strategy, Template method, Visitor. Chain of responsibility is a way
of passing a request between a chain of objects, Command encapsulate a command request as an
object, Interpreter provides a way to include language elements in a program, Iterator sequentially
Page | 3
access the elements of a collection, Mediator defines simplified communication between classes,
Memento captures and restores an object's internal state, Null Object designed to act as a default
value of an object, Observer provides a way of notifying change to a number of classes, State alter
an object's behavior when its state changes, Strategy encapsulates an algorithm inside a class,
Template method hold on to the exact steps of an algorithm to a subclass and Visitor defines a new
operation to a class without change

Más contenido relacionado

La actualidad más candente

La actualidad más candente (18)

Chapter10 conceptual data modeling
Chapter10 conceptual data modelingChapter10 conceptual data modeling
Chapter10 conceptual data modeling
 
A&D - Object Oriented Design using UML
A&D - Object Oriented Design using UMLA&D - Object Oriented Design using UML
A&D - Object Oriented Design using UML
 
Different Types Diagrams
Different Types Diagrams  Different Types Diagrams
Different Types Diagrams
 
Lecture 5 se
Lecture 5 seLecture 5 se
Lecture 5 se
 
Behavioural design pattern
Behavioural design patternBehavioural design pattern
Behavioural design pattern
 
Architectural styles 2
Architectural styles   2Architectural styles   2
Architectural styles 2
 
Ch8
Ch8Ch8
Ch8
 
IRJET- Link Prediction in Social Networks
IRJET- Link Prediction in Social NetworksIRJET- Link Prediction in Social Networks
IRJET- Link Prediction in Social Networks
 
SE_Lec 07_UML CLASS DIAGRAM
SE_Lec 07_UML CLASS DIAGRAMSE_Lec 07_UML CLASS DIAGRAM
SE_Lec 07_UML CLASS DIAGRAM
 
Asse2001
Asse2001Asse2001
Asse2001
 
DBMS OF DATA MODEL Deepika 2
DBMS OF DATA MODEL  Deepika 2DBMS OF DATA MODEL  Deepika 2
DBMS OF DATA MODEL Deepika 2
 
Chapter3
Chapter3Chapter3
Chapter3
 
All_Data_DBMS_MODELS 130725130028-phpapp01
All_Data_DBMS_MODELS 130725130028-phpapp01All_Data_DBMS_MODELS 130725130028-phpapp01
All_Data_DBMS_MODELS 130725130028-phpapp01
 
All data models in dbms
All data models in dbmsAll data models in dbms
All data models in dbms
 
Dissertation Defense Presentation
Dissertation Defense PresentationDissertation Defense Presentation
Dissertation Defense Presentation
 
Mauri Eugenio reasoning with goals
Mauri Eugenio reasoning with goalsMauri Eugenio reasoning with goals
Mauri Eugenio reasoning with goals
 
Ooad
OoadOoad
Ooad
 
SECh78
SECh78SECh78
SECh78
 

Similar a Software Architecture Design Patterns Summary

Basic design pattern interview questions
Basic design pattern interview questionsBasic design pattern interview questions
Basic design pattern interview questionsjinaldesailive
 
ap assignmnet presentation.pptx
ap assignmnet presentation.pptxap assignmnet presentation.pptx
ap assignmnet presentation.pptxAwanAdhikari
 
Design pattern 1
Design pattern 1Design pattern 1
Design pattern 1Naga Muruga
 
Architecture and design
Architecture and designArchitecture and design
Architecture and designhimanshu_airon
 
Uml diagram assignment help
Uml diagram assignment helpUml diagram assignment help
Uml diagram assignment helpsmithjonny9876
 
Typescript design patterns applied to sharepoint framework - Sharepoint Satur...
Typescript design patterns applied to sharepoint framework - Sharepoint Satur...Typescript design patterns applied to sharepoint framework - Sharepoint Satur...
Typescript design patterns applied to sharepoint framework - Sharepoint Satur...Luis Valencia
 
Introduction to UML
Introduction to UMLIntroduction to UML
Introduction to UMLyndaravind
 
Object-oriented modeling and design.pdf
Object-oriented modeling and  design.pdfObject-oriented modeling and  design.pdf
Object-oriented modeling and design.pdfSHIVAM691605
 
Lecture-_-5-_SDA_software design and architecture.doc
Lecture-_-5-_SDA_software design and architecture.docLecture-_-5-_SDA_software design and architecture.doc
Lecture-_-5-_SDA_software design and architecture.docesrabilgic2
 
Bt8901 objective oriented systems1
Bt8901 objective oriented systems1Bt8901 objective oriented systems1
Bt8901 objective oriented systems1Techglyphs
 
Design Pattern Notes: Nagpur University
Design Pattern Notes: Nagpur UniversityDesign Pattern Notes: Nagpur University
Design Pattern Notes: Nagpur UniversityShubham Narkhede
 
Class and object_diagram
Class  and object_diagramClass  and object_diagram
Class and object_diagramSadhana28
 

Similar a Software Architecture Design Patterns Summary (20)

Basic design pattern interview questions
Basic design pattern interview questionsBasic design pattern interview questions
Basic design pattern interview questions
 
ap assignmnet presentation.pptx
ap assignmnet presentation.pptxap assignmnet presentation.pptx
ap assignmnet presentation.pptx
 
Oomd unit1
Oomd unit1Oomd unit1
Oomd unit1
 
Design pattern 1
Design pattern 1Design pattern 1
Design pattern 1
 
Architecture and design
Architecture and designArchitecture and design
Architecture and design
 
Object oriented analysis and design unit- iv
Object oriented analysis and design unit- ivObject oriented analysis and design unit- iv
Object oriented analysis and design unit- iv
 
Design patterns
Design patternsDesign patterns
Design patterns
 
Sda 7
Sda   7Sda   7
Sda 7
 
Uml diagram assignment help
Uml diagram assignment helpUml diagram assignment help
Uml diagram assignment help
 
Class notes
Class notesClass notes
Class notes
 
Typescript design patterns applied to sharepoint framework - Sharepoint Satur...
Typescript design patterns applied to sharepoint framework - Sharepoint Satur...Typescript design patterns applied to sharepoint framework - Sharepoint Satur...
Typescript design patterns applied to sharepoint framework - Sharepoint Satur...
 
Introduction to UML
Introduction to UMLIntroduction to UML
Introduction to UML
 
Object-oriented modeling and design.pdf
Object-oriented modeling and  design.pdfObject-oriented modeling and  design.pdf
Object-oriented modeling and design.pdf
 
Lecture-_-5-_SDA_software design and architecture.doc
Lecture-_-5-_SDA_software design and architecture.docLecture-_-5-_SDA_software design and architecture.doc
Lecture-_-5-_SDA_software design and architecture.doc
 
Bt8901 objective oriented systems1
Bt8901 objective oriented systems1Bt8901 objective oriented systems1
Bt8901 objective oriented systems1
 
Design Pattern Notes: Nagpur University
Design Pattern Notes: Nagpur UniversityDesign Pattern Notes: Nagpur University
Design Pattern Notes: Nagpur University
 
Sda 2
Sda   2Sda   2
Sda 2
 
Asse2001
Asse2001Asse2001
Asse2001
 
Design pattern
Design patternDesign pattern
Design pattern
 
Class and object_diagram
Class  and object_diagramClass  and object_diagram
Class and object_diagram
 

Más de Farwa Ansari

Energy Harvesting Techniques in Wireless Sensor Networks – A Survey
Energy Harvesting Techniques in Wireless Sensor Networks – A SurveyEnergy Harvesting Techniques in Wireless Sensor Networks – A Survey
Energy Harvesting Techniques in Wireless Sensor Networks – A SurveyFarwa Ansari
 
Micro-services architecture
Micro-services architectureMicro-services architecture
Micro-services architectureFarwa Ansari
 
Optimizing the memory management of a virtual machine monitor on a NUMA syste...
Optimizing the memory management of a virtual machine monitor on a NUMA syste...Optimizing the memory management of a virtual machine monitor on a NUMA syste...
Optimizing the memory management of a virtual machine monitor on a NUMA syste...Farwa Ansari
 
Fault Tolerance Typed Assembly Language - A graphical overview
Fault Tolerance Typed Assembly Language - A graphical overviewFault Tolerance Typed Assembly Language - A graphical overview
Fault Tolerance Typed Assembly Language - A graphical overviewFarwa Ansari
 
Comparative Analysis of Face Recognition Methodologies and Techniques
Comparative Analysis of Face Recognition Methodologies and TechniquesComparative Analysis of Face Recognition Methodologies and Techniques
Comparative Analysis of Face Recognition Methodologies and TechniquesFarwa Ansari
 
Chapter 5: Names, Bindings and Scopes (review Questions and Problem Set)
Chapter 5: Names, Bindings and Scopes (review Questions and Problem Set)Chapter 5: Names, Bindings and Scopes (review Questions and Problem Set)
Chapter 5: Names, Bindings and Scopes (review Questions and Problem Set)Farwa Ansari
 
Chapter 4: Lexical & Syntax Analysis (Programming Exercises)
Chapter 4: Lexical & Syntax Analysis (Programming Exercises)Chapter 4: Lexical & Syntax Analysis (Programming Exercises)
Chapter 4: Lexical & Syntax Analysis (Programming Exercises)Farwa Ansari
 
Business plan of a software house
Business plan of a software houseBusiness plan of a software house
Business plan of a software houseFarwa Ansari
 
Mission statement and Vision statement of 3 Different Companies
Mission statement and Vision statement of 3 Different CompaniesMission statement and Vision statement of 3 Different Companies
Mission statement and Vision statement of 3 Different CompaniesFarwa Ansari
 
Applications of Image Processing
Applications of Image ProcessingApplications of Image Processing
Applications of Image ProcessingFarwa Ansari
 
Cohen sutherland algorithm
Cohen sutherland algorithmCohen sutherland algorithm
Cohen sutherland algorithmFarwa Ansari
 
Raster images (assignment)
Raster images (assignment)Raster images (assignment)
Raster images (assignment)Farwa Ansari
 
Prefix and suffix of open gl
Prefix and suffix of open glPrefix and suffix of open gl
Prefix and suffix of open glFarwa Ansari
 
Linear combination of vector
Linear combination of vectorLinear combination of vector
Linear combination of vectorFarwa Ansari
 
Graphic display devices
Graphic display devicesGraphic display devices
Graphic display devicesFarwa Ansari
 
Implementation & Challenges of IPv6
Implementation & Challenges of IPv6Implementation & Challenges of IPv6
Implementation & Challenges of IPv6 Farwa Ansari
 
IPv6 Implementation challenges
IPv6 Implementation challengesIPv6 Implementation challenges
IPv6 Implementation challengesFarwa Ansari
 
Tomasulo Algorithm
Tomasulo AlgorithmTomasulo Algorithm
Tomasulo AlgorithmFarwa Ansari
 
Summary of Simultaneous Multithreading: Maximizing On-Chip Parallelism
Summary of Simultaneous Multithreading: Maximizing On-Chip ParallelismSummary of Simultaneous Multithreading: Maximizing On-Chip Parallelism
Summary of Simultaneous Multithreading: Maximizing On-Chip ParallelismFarwa Ansari
 

Más de Farwa Ansari (20)

Energy Harvesting Techniques in Wireless Sensor Networks – A Survey
Energy Harvesting Techniques in Wireless Sensor Networks – A SurveyEnergy Harvesting Techniques in Wireless Sensor Networks – A Survey
Energy Harvesting Techniques in Wireless Sensor Networks – A Survey
 
Micro-services architecture
Micro-services architectureMicro-services architecture
Micro-services architecture
 
Optimizing the memory management of a virtual machine monitor on a NUMA syste...
Optimizing the memory management of a virtual machine monitor on a NUMA syste...Optimizing the memory management of a virtual machine monitor on a NUMA syste...
Optimizing the memory management of a virtual machine monitor on a NUMA syste...
 
Fault Tolerance Typed Assembly Language - A graphical overview
Fault Tolerance Typed Assembly Language - A graphical overviewFault Tolerance Typed Assembly Language - A graphical overview
Fault Tolerance Typed Assembly Language - A graphical overview
 
Comparative Analysis of Face Recognition Methodologies and Techniques
Comparative Analysis of Face Recognition Methodologies and TechniquesComparative Analysis of Face Recognition Methodologies and Techniques
Comparative Analysis of Face Recognition Methodologies and Techniques
 
Chapter 5: Names, Bindings and Scopes (review Questions and Problem Set)
Chapter 5: Names, Bindings and Scopes (review Questions and Problem Set)Chapter 5: Names, Bindings and Scopes (review Questions and Problem Set)
Chapter 5: Names, Bindings and Scopes (review Questions and Problem Set)
 
Chapter 4: Lexical & Syntax Analysis (Programming Exercises)
Chapter 4: Lexical & Syntax Analysis (Programming Exercises)Chapter 4: Lexical & Syntax Analysis (Programming Exercises)
Chapter 4: Lexical & Syntax Analysis (Programming Exercises)
 
Business plan of a software house
Business plan of a software houseBusiness plan of a software house
Business plan of a software house
 
Mission statement and Vision statement of 3 Different Companies
Mission statement and Vision statement of 3 Different CompaniesMission statement and Vision statement of 3 Different Companies
Mission statement and Vision statement of 3 Different Companies
 
Applications of Image Processing
Applications of Image ProcessingApplications of Image Processing
Applications of Image Processing
 
Cohen sutherland algorithm
Cohen sutherland algorithmCohen sutherland algorithm
Cohen sutherland algorithm
 
Scaling
ScalingScaling
Scaling
 
Raster images (assignment)
Raster images (assignment)Raster images (assignment)
Raster images (assignment)
 
Prefix and suffix of open gl
Prefix and suffix of open glPrefix and suffix of open gl
Prefix and suffix of open gl
 
Linear combination of vector
Linear combination of vectorLinear combination of vector
Linear combination of vector
 
Graphic display devices
Graphic display devicesGraphic display devices
Graphic display devices
 
Implementation & Challenges of IPv6
Implementation & Challenges of IPv6Implementation & Challenges of IPv6
Implementation & Challenges of IPv6
 
IPv6 Implementation challenges
IPv6 Implementation challengesIPv6 Implementation challenges
IPv6 Implementation challenges
 
Tomasulo Algorithm
Tomasulo AlgorithmTomasulo Algorithm
Tomasulo Algorithm
 
Summary of Simultaneous Multithreading: Maximizing On-Chip Parallelism
Summary of Simultaneous Multithreading: Maximizing On-Chip ParallelismSummary of Simultaneous Multithreading: Maximizing On-Chip Parallelism
Summary of Simultaneous Multithreading: Maximizing On-Chip Parallelism
 

Último

Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
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...christianmathematics
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
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. Mahajanpragatimahajan3
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 

Último (20)

Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
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...
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).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
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
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
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
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 Architecture Design Patterns Summary

  • 1. Software Architecture (Assignment – 3) By Farwa Abdul Hannan (16F-9006) Fast – National University of Computer & Emerging Sciences
  • 2. Page | 1 Software Design Patterns Summary A design pattern is a general reusable solution to a commonly occurring problem in software design. A design pattern is not a finished design that can be transformed directly into code instead it is a description or template for how to solve a problem that can be used in many different situations. Object-oriented design patterns typically show relationships and interactions between classes or objects, without specifying the final application classes or objects that are involved. At a higher level there are architectural patterns that are larger in scope, usually describing an overall pattern followed by an entire system. Design patterns are a powerful tool for software developers. Originally, design patterns were grouped in to the 3 categories: creational patterns, structural patterns, and behavioral patterns. Creational design patterns deal with the mechanism of object creation and trying to create the object in such a way that they are suitable to the situation. The creational patterns aim to separate a system from how its objects are created, composed, and represented. They increase the system's flexibility in terms of the what, who, how, and when of object creation. The basic form of object creation could result in design problems or in added complexity to the design. Creational design patterns solve this problem by somehow controlling this object creation. These design patterns consist of 2 main ideas i.e. encapsulating knowledge about which concrete classes the system uses and hiding the detail related to how instances of these concrete classes are created and combined. Creational design patterns are further categorized into Object-creational patterns and Class- creational patterns. Object-creational patterns deal with Object creation and Class-creational patterns deal with Class-instantiation. Also that Object-creational patterns defer part of its object creation to another object, while Class-creational patterns defer its object creation to subclasses. There are five more patterns that are the part of the creational design patterns. These five patterns are Abstract factory pattern, which provides an interface for creating related or dependent objects without specifying the concrete classes of objects, Builder pattern, which separates the construction of a complex object from its representation so that the same construction process can create different representations, Factory method pattern, which allows a class to defer instantiation to subclasses, Prototype pattern, which specifies the kind of object to create using a prototypical
  • 3. Page | 2 instance, and creates new objects by cloning this prototype, Singleton pattern, which ensures that a class only has one instance, and provides a global point of access to it. The second type of design pattern is the structural pattern. Structural patterns provide a manner to define relationships between classes or objects. These design patterns are all about Class and Object composition. Structural object-patterns define ways to compose objects to obtain new functionality. Concept of inheritance is used to compose interfaces and define ways to compose objects to obtain new functionalities. These design patterns contains multiple parts like adapter, bridge, composite, decorator, facade, flyweight, private class data and proxy. Adapter or Wrapper converts the interface of a class into another interface clients expect. Adapter lets classes work together that could not otherwise because of incompatible interfaces. Bridge decouple an abstraction from its implementation allowing the two to vary independently. Composite compose objects into tree structures to represent part-whole hierarchies. Composite lets clients treat individual objects and compositions of objects uniformly. Decorator attach additional responsibilities to an object dynamically keeping the same interface. Decorators provide a flexible alternative to subclassing for extending functionality. Facade provide a unified interface to a set of interfaces in a subsystem. Facade defines a higher-level interface that makes the subsystem easier to use. Front Controller provide a unified interface to a set of interfaces in a subsystem. Front Controller defines a higher-level interface that makes the subsystem easier to use. Flyweight use sharing to support large numbers of fine-grained objects efficiently. Proxy provide a surrogate or placeholder for another object to control access to it. The final type of design pattern is the behavioral pattern. Behavioral patterns define manners of communication between classes and objects. These design patterns are all about Class's objects communication. Behavioral patterns are those patterns that are most specifically concerned with communication between objects. They identify common communication patterns between objects and realize these patterns. By doing so, these patterns increase flexibility in carrying out this communication. Behavioral patterns consists of twelve patterns that are the part of these behavioral patterns and they are Chain of responsibility, Command, Interpreter, Iterator, Mediator, Memento, Null Object, Observer, State, Strategy, Template method, Visitor. Chain of responsibility is a way of passing a request between a chain of objects, Command encapsulate a command request as an object, Interpreter provides a way to include language elements in a program, Iterator sequentially
  • 4. Page | 3 access the elements of a collection, Mediator defines simplified communication between classes, Memento captures and restores an object's internal state, Null Object designed to act as a default value of an object, Observer provides a way of notifying change to a number of classes, State alter an object's behavior when its state changes, Strategy encapsulates an algorithm inside a class, Template method hold on to the exact steps of an algorithm to a subclass and Visitor defines a new operation to a class without change