SlideShare a Scribd company logo
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

More Related Content

What's hot

Chapter10 conceptual data modeling
Chapter10 conceptual data modelingChapter10 conceptual data modeling
Chapter10 conceptual data modeling
Dhani Ahmad
 
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
vinay arora
 
Different Types Diagrams
Different Types Diagrams  Different Types Diagrams
Different Types Diagrams
ShauryaGupta38
 
Lecture 5 se
Lecture 5 seLecture 5 se
Lecture 5 se
Tribhuvan University
 
Behavioural design pattern
Behavioural design patternBehavioural design pattern
Behavioural design pattern
Biruk Mamo
 
Architectural styles 2
Architectural styles   2Architectural styles   2
Architectural styles 2
Dr Reeja S R
 
Ch8
Ch8Ch8
IRJET- Link Prediction in Social Networks
IRJET- Link Prediction in Social NetworksIRJET- Link Prediction in Social Networks
IRJET- Link Prediction in Social Networks
IRJET Journal
 
SE_Lec 07_UML CLASS DIAGRAM
SE_Lec 07_UML CLASS DIAGRAMSE_Lec 07_UML CLASS DIAGRAM
SE_Lec 07_UML CLASS DIAGRAM
Amr E. Mohamed
 
Asse2001
Asse2001Asse2001
Asse2001
aramos245
 
DBMS OF DATA MODEL Deepika 2
DBMS OF DATA MODEL  Deepika 2DBMS OF DATA MODEL  Deepika 2
DBMS OF DATA MODEL Deepika 2
Rai Saheb Bhanwar Singh College Nasrullaganj
 
Chapter3
Chapter3Chapter3
Chapter3
Dang Tuan
 
All_Data_DBMS_MODELS 130725130028-phpapp01
All_Data_DBMS_MODELS 130725130028-phpapp01All_Data_DBMS_MODELS 130725130028-phpapp01
All_Data_DBMS_MODELS 130725130028-phpapp01
RollyTripathi
 
All data models in dbms
All data models in dbmsAll data models in dbms
All data models in dbms
Naresh Kumar
 
Dissertation Defense Presentation
Dissertation Defense PresentationDissertation Defense Presentation
Dissertation Defense Presentation
The Children's Hospital of Philadelphia
 
Mauri Eugenio reasoning with goals
Mauri Eugenio reasoning with goalsMauri Eugenio reasoning with goals
Mauri Eugenio reasoning with goals
Eugenio Mauri
 
Ooad
OoadOoad
Ooad
gantib
 
SECh78
SECh78SECh78

What's hot (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 to Software Design Patterns - An Overview

Basic design pattern interview questions
Basic design pattern interview questionsBasic design pattern interview questions
Basic design pattern interview questions
jinaldesailive
 
ap assignmnet presentation.pptx
ap assignmnet presentation.pptxap assignmnet presentation.pptx
ap assignmnet presentation.pptx
AwanAdhikari
 
Oomd unit1
Oomd unit1Oomd unit1
Oomd unit1
VivekChaudhary93
 
Design pattern 1
Design pattern 1Design pattern 1
Design pattern 1
Naga Muruga
 
Architecture and design
Architecture and designArchitecture and design
Architecture and design
himanshu_airon
 
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
Shri Shankaracharya College, Bhilai,Junwani
 
Design patterns
Design patternsDesign patterns
Design patterns
Kolade Ibrahim Arowolo
 
Sda 7
Sda   7Sda   7
Uml diagram assignment help
Uml diagram assignment helpUml diagram assignment help
Uml diagram assignment help
smithjonny9876
 
Class notes
Class notesClass 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...
Luis Valencia
 
Introduction to UML
Introduction to UMLIntroduction to UML
Introduction to UML
yndaravind
 
Object-oriented modeling and design.pdf
Object-oriented modeling and  design.pdfObject-oriented modeling and  design.pdf
Object-oriented modeling and design.pdf
SHIVAM691605
 
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
esrabilgic2
 
Bt8901 objective oriented systems1
Bt8901 objective oriented systems1Bt8901 objective oriented systems1
Bt8901 objective oriented systems1
Techglyphs
 
Design Pattern Notes: Nagpur University
Design Pattern Notes: Nagpur UniversityDesign Pattern Notes: Nagpur University
Design Pattern Notes: Nagpur University
Shubham Narkhede
 
Sda 2
Sda   2Sda   2
Asse2001
Asse2001Asse2001
Design pattern
Design patternDesign pattern
Design pattern
Ramakrishna kapa
 
Class and object_diagram
Class  and object_diagramClass  and object_diagram
Class and object_diagram
Sadhana28
 

Similar to Software Design Patterns - An Overview (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
 

More from 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 Survey
Farwa Ansari
 
Micro-services architecture
Micro-services architectureMicro-services architecture
Micro-services architecture
Farwa 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 overview
Farwa 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 Techniques
Farwa 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 house
Farwa 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 Companies
Farwa Ansari
 
Applications of Image Processing
Applications of Image ProcessingApplications of Image Processing
Applications of Image Processing
Farwa Ansari
 
Cohen sutherland algorithm
Cohen sutherland algorithmCohen sutherland algorithm
Cohen sutherland algorithm
Farwa Ansari
 
Scaling
ScalingScaling
Scaling
Farwa 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 gl
Farwa Ansari
 
Linear combination of vector
Linear combination of vectorLinear combination of vector
Linear combination of vector
Farwa Ansari
 
Graphic display devices
Graphic display devicesGraphic display devices
Graphic display devices
Farwa 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 challenges
Farwa Ansari
 
Tomasulo Algorithm
Tomasulo AlgorithmTomasulo Algorithm
Tomasulo Algorithm
Farwa 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 Parallelism
Farwa Ansari
 

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

Recently uploaded

clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
Priyankaranawat4
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
taiba qazi
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
amberjdewit93
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Excellence Foundation for South Sudan
 
Top five deadliest dog breeds in America
Top five deadliest dog breeds in AmericaTop five deadliest dog breeds in America
Top five deadliest dog breeds in America
Bisnar Chase Personal Injury Attorneys
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
AyyanKhan40
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
PECB
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
Dr. Mulla Adam Ali
 
Assessment and Planning in Educational technology.pptx
Assessment and Planning in Educational technology.pptxAssessment and Planning in Educational technology.pptx
Assessment and Planning in Educational technology.pptx
Kavitha Krishnan
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
WaniBasim
 
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
RitikBhardwaj56
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
heathfieldcps1
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
Nicholas Montgomery
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
Jean Carlos Nunes Paixão
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
Celine George
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
Academy of Science of South Africa
 
How to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRMHow to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRM
Celine George
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
tarandeep35
 

Recently uploaded (20)

clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
 
Top five deadliest dog breeds in America
Top five deadliest dog breeds in AmericaTop five deadliest dog breeds in America
Top five deadliest dog breeds in America
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
 
Assessment and Planning in Educational technology.pptx
Assessment and Planning in Educational technology.pptxAssessment and Planning in Educational technology.pptx
Assessment and Planning in Educational technology.pptx
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
 
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
 
How to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRMHow to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRM
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
 

Software Design Patterns - An Overview

  • 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