Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
SlideShare a Scribd company logo
1
Gul Sher Ali
BS(Hons) CS - UOG
MS(CS & Tech.)-China
Software Engineering II(CS-552)
______________________________________________________
GIMS- PMAS Arid Agriculture University, Gujrat Campus
Design Pattern
 In software engineering, a design pattern is a general repeatable solution
to a commonly occurring problem in software design.[1]
Figure : 1 Design Patterns[4]
Uses of Design Patterns
Design patterns can speed up the development
process by providing tested, proven development
paradigms.
 Effective software design requires considering issues
that may not become visible until later in the
implementation.
 Reusing design patterns helps to prevent subtle
issues that can cause major problems and improves
code readability for coders and architects familiar
with the patterns.
Types of Design Pattern In
Software Engineering
Creational Patterns
Structural Patterns
Behavioral Patterns
Creational Design Patterns
In software engineering, creational design patterns
are design patterns that deal with object creation
mechanisms, trying to create objects in a manner
suitable to the situation.
Types of Creational design Patterns
Abstract Factory
Builder
Factory Method
Prototype
Singleton
Abstract Factory
 Provide an interface for creating families of related or dependent objects
without specifying their concrete classes.[4]
Figure : 2 Abstract Factory [4]
Builder
 Separate the construction of a complex object from its representation so
that the same construction process can create different
representations.[5]
Figure : 3 Builder [3]
Factory method
 Define an interface for creating an object, but let subclasses decide which
class to instantiate. Factory Method lets a class defer instantiation to
subclasses.[5]
Figure : 4 Factory Method [4]
Prototype
Start with an initialized and instantiated class and
copy or clones it to make new instances rather than
creating to a new instances.[5]
Singleton
A class of which only a single instance can exist and
provide a global point of access to it.[5]
Structural Pattern
These concern class and object composition. They
use inheritance to compose interfaces and define
ways to compose objects to obtain new
functionality.
Types of Structural Pattern
Adapter
Bridge
Composite
Decorator
Façade
Flyweight
Proxy
Adapter
 Adapter allows classes with incompatible interfaces to work together by
wrapping its own interface around that of an already existing class.[4]
Figure 5: Adapter Pattern[4]
Bridge
 Bridge pattern intended to keep the interface to your client program
constant while allowing you to change the actual kind of class you display
or used. You can then change the interface and underline class
separately.[5]
 A household switch controlling lights, ceiling fans, etc. is an example of
the Bridge.[3]
Composite
 The Composite composes objects into tree structures, and
lets clients treat individual objects and compositions
uniformly.[3]
Decorator
 A Class that surrounds a given class, adds new capabilities to it, and
passes all the unchanged methods to the underlying class.[5]
Figure 7: Decorator Pattern[4]
Facade
Facade provides a simplified interface to a large body
of code.[6]
Figure 8: Facade Pattern[4]
Flyweight
Reduces the cost of creating and manipulating a
large number of similar objects.
It provides a way to limit the proliferation of small
similar class instances by moving some of class data
outside the class and passing it in during various
execution method.
Proxy
Provides a placeholder for another object to control
access, reduce cost, and reduce complexity.
Behavioral Patterns
Most of these design patterns are specifically
concerned with communication between objects.
Types of Behavioral Pattern
Chain of Responsibility
Command
Interpreter
Iteretor
Mediator
Observer
State
Strategy
Template Method
Visitor
Chain of Responsibility
The main purpose of this pattern is to reduce
coupling between objects and object only need to
know how to forward the request to other objects.
Command
It encapsulates a
request as an object
there by letting you
parameterized other
objects with different
request, queue or log
request and support
undoable operations.
Figure 9: Command Pattern[4
Interpreter
Interpreter provides a definition of how to include
language elements in a program.
Iterator
Accesses the elements of an object sequentially
without exposing its underlying representation.
Mediator
Allows loose coupling between classes by being the
only class that has detailed knowledge of their
methods.
Observer
Observer is a publish/subscribe pattern which allows
a number of observer objects to see an event.
Figure 10: Observer Pattern[4]
State
State allows an object to alter its behavior when its
internal state changes.
Strategy
Strategy allows one of a family of algorithms to be
selected on-the-fly at runtime.
Template Method
 Template method defines the skeleton of an algorithm as an abstract
class, allowing its subclasses to provide concrete behavior.
Figure 11: Template Pattern[4]
Visitor separates an algorithm from an object
structure by moving the hierarchy of methods
into one object.
Memento Pattern
If you want to save the internal state of an object so
you can restore it later ideally it should be possible
to save and restore this state without making the
object itself take care of this task.
Figure : 12 Memento Pattern[3]

More Related Content

What's hot

Software Estimation
Software EstimationSoftware Estimation
Software Estimation
Nguyen Hai
 
Estimation
EstimationEstimation
Estimation
weebill
 
Software Estimation
Software EstimationSoftware Estimation
Software Estimation
Dinesh Singh
 
Software cost estimation
Software cost estimationSoftware cost estimation
Software cost estimation
Haitham Ahmed
 
Se notes
Se notesSe notes
Software Project Planning 1
Software Project Planning 1Software Project Planning 1
Software Project Planning 1
Gagan Deep
 
Software Estimation Part I
Software Estimation Part ISoftware Estimation Part I
Software Estimation Part I
sslovepk
 
Software Estimation
Software EstimationSoftware Estimation
Software Estimation
shashankjain04
 
Software Sizing
Software SizingSoftware Sizing
Software Sizing
Noman Aftab
 
Cocomo model
Cocomo modelCocomo model
Cocomo model
Sony Elizabeth
 
COCOMO MODEL
COCOMO MODELCOCOMO MODEL
COCOMO MODEL
movie_2009
 
Software Estimation Techniques
Software Estimation TechniquesSoftware Estimation Techniques
Software Estimation Techniques
kamal
 
Ch26
Ch26Ch26
Ch26
phanleson
 
Line of Code (LOC) Matric and Function Point Matric
Line of Code (LOC) Matric and Function Point MatricLine of Code (LOC) Matric and Function Point Matric
Line of Code (LOC) Matric and Function Point Matric
Ankush Singh
 
Software cost estimation
Software cost estimationSoftware cost estimation
Software cost estimation
deep sharma
 
Cocomo
CocomoCocomo
Extreme software estimation (xsoft estimation)
Extreme software estimation (xsoft estimation)Extreme software estimation (xsoft estimation)
Extreme software estimation (xsoft estimation)
eSAT Publishing House
 
Extreme software estimation (xsoft estimation)
Extreme software estimation (xsoft estimation)Extreme software estimation (xsoft estimation)
Extreme software estimation (xsoft estimation)
eSAT Journals
 
software cost factor
software cost factorsoftware cost factor
software cost factor
Abinaya B
 
Software project estimation
Software project estimationSoftware project estimation
Software project estimation
inayat khan
 

What's hot (20)

Software Estimation
Software EstimationSoftware Estimation
Software Estimation
 
Estimation
EstimationEstimation
Estimation
 
Software Estimation
Software EstimationSoftware Estimation
Software Estimation
 
Software cost estimation
Software cost estimationSoftware cost estimation
Software cost estimation
 
Se notes
Se notesSe notes
Se notes
 
Software Project Planning 1
Software Project Planning 1Software Project Planning 1
Software Project Planning 1
 
Software Estimation Part I
Software Estimation Part ISoftware Estimation Part I
Software Estimation Part I
 
Software Estimation
Software EstimationSoftware Estimation
Software Estimation
 
Software Sizing
Software SizingSoftware Sizing
Software Sizing
 
Cocomo model
Cocomo modelCocomo model
Cocomo model
 
COCOMO MODEL
COCOMO MODELCOCOMO MODEL
COCOMO MODEL
 
Software Estimation Techniques
Software Estimation TechniquesSoftware Estimation Techniques
Software Estimation Techniques
 
Ch26
Ch26Ch26
Ch26
 
Line of Code (LOC) Matric and Function Point Matric
Line of Code (LOC) Matric and Function Point MatricLine of Code (LOC) Matric and Function Point Matric
Line of Code (LOC) Matric and Function Point Matric
 
Software cost estimation
Software cost estimationSoftware cost estimation
Software cost estimation
 
Cocomo
CocomoCocomo
Cocomo
 
Extreme software estimation (xsoft estimation)
Extreme software estimation (xsoft estimation)Extreme software estimation (xsoft estimation)
Extreme software estimation (xsoft estimation)
 
Extreme software estimation (xsoft estimation)
Extreme software estimation (xsoft estimation)Extreme software estimation (xsoft estimation)
Extreme software estimation (xsoft estimation)
 
software cost factor
software cost factorsoftware cost factor
software cost factor
 
Software project estimation
Software project estimationSoftware project estimation
Software project estimation
 

Similar to Design Pattern in Software Engineering

Gof design pattern
Gof design patternGof design pattern
Gof design pattern
naveen kumar
 
Design patterns
Design patternsDesign patterns
Design patterns
Ahmed Elharouny
 
ABSTRACT FACTORY AND SINGLETON DESIGN PATTERNS TO CREATE DECORATOR PATTERN OB...
ABSTRACT FACTORY AND SINGLETON DESIGN PATTERNS TO CREATE DECORATOR PATTERN OB...ABSTRACT FACTORY AND SINGLETON DESIGN PATTERNS TO CREATE DECORATOR PATTERN OB...
ABSTRACT FACTORY AND SINGLETON DESIGN PATTERNS TO CREATE DECORATOR PATTERN OB...
ijait
 
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
 
Unit 3
Unit 3Unit 3
Introduction To Design Patterns
Introduction To Design PatternsIntroduction To Design Patterns
Introduction To Design Patterns
sukumarraju6
 
Architecture and design
Architecture and designArchitecture and design
Architecture and design
himanshu_airon
 
Design Concepts in Software Engineering-1.pptx
Design Concepts in Software Engineering-1.pptxDesign Concepts in Software Engineering-1.pptx
Design Concepts in Software Engineering-1.pptx
KarthigaiSelviS3
 
Design patterns
Design patternsDesign patterns
Design patterns
Binu Bhasuran
 
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 Engineering is a topic of software engineering of second year fourth s...
Design Engineering is a topic of software engineering of second year fourth s...Design Engineering is a topic of software engineering of second year fourth s...
Design Engineering is a topic of software engineering of second year fourth s...
38aartidhage
 
Basic design pattern interview questions
Basic design pattern interview questionsBasic design pattern interview questions
Basic design pattern interview questions
jinaldesailive
 
SADP PPTs of all modules - Shanthi D.L.pdf
SADP PPTs of all modules - Shanthi D.L.pdfSADP PPTs of all modules - Shanthi D.L.pdf
SADP PPTs of all modules - Shanthi D.L.pdf
B.T.L.I.T
 
Object-Oriented Analysis and Design
Object-Oriented Analysis and DesignObject-Oriented Analysis and Design
Object-Oriented Analysis and Design
IJOAEM
 
Software design and Architecture.pptx
Software design and Architecture.pptxSoftware design and Architecture.pptx
Software design and Architecture.pptx
SHAHZAIBABBAS13
 
Object Oriented Approach for Software Development
Object Oriented Approach for Software DevelopmentObject Oriented Approach for Software Development
Object Oriented Approach for Software Development
Rishabh Soni
 
Design patterns
Design patternsDesign patterns
Design patterns
Vignesh Nethaji
 
Software Architecture and Project Management module III : PATTERN OF ENTERPRISE
Software Architecture and Project Management module III : PATTERN OF ENTERPRISESoftware Architecture and Project Management module III : PATTERN OF ENTERPRISE
Software Architecture and Project Management module III : PATTERN OF ENTERPRISE
sreeja_rajesh
 
ap assignmnet presentation.pptx
ap assignmnet presentation.pptxap assignmnet presentation.pptx
ap assignmnet presentation.pptx
AwanAdhikari
 
C# Design Patterns | Design Pattern Tutorial For Beginners | C# Programming T...
C# Design Patterns | Design Pattern Tutorial For Beginners | C# Programming T...C# Design Patterns | Design Pattern Tutorial For Beginners | C# Programming T...
C# Design Patterns | Design Pattern Tutorial For Beginners | C# Programming T...
Simplilearn
 

Similar to Design Pattern in Software Engineering (20)

Gof design pattern
Gof design patternGof design pattern
Gof design pattern
 
Design patterns
Design patternsDesign patterns
Design patterns
 
ABSTRACT FACTORY AND SINGLETON DESIGN PATTERNS TO CREATE DECORATOR PATTERN OB...
ABSTRACT FACTORY AND SINGLETON DESIGN PATTERNS TO CREATE DECORATOR PATTERN OB...ABSTRACT FACTORY AND SINGLETON DESIGN PATTERNS TO CREATE DECORATOR PATTERN OB...
ABSTRACT FACTORY AND SINGLETON DESIGN PATTERNS TO CREATE DECORATOR PATTERN OB...
 
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...
 
Unit 3
Unit 3Unit 3
Unit 3
 
Introduction To Design Patterns
Introduction To Design PatternsIntroduction To Design Patterns
Introduction To Design Patterns
 
Architecture and design
Architecture and designArchitecture and design
Architecture and design
 
Design Concepts in Software Engineering-1.pptx
Design Concepts in Software Engineering-1.pptxDesign Concepts in Software Engineering-1.pptx
Design Concepts in Software Engineering-1.pptx
 
Design patterns
Design patternsDesign patterns
Design patterns
 
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 Engineering is a topic of software engineering of second year fourth s...
Design Engineering is a topic of software engineering of second year fourth s...Design Engineering is a topic of software engineering of second year fourth s...
Design Engineering is a topic of software engineering of second year fourth s...
 
Basic design pattern interview questions
Basic design pattern interview questionsBasic design pattern interview questions
Basic design pattern interview questions
 
SADP PPTs of all modules - Shanthi D.L.pdf
SADP PPTs of all modules - Shanthi D.L.pdfSADP PPTs of all modules - Shanthi D.L.pdf
SADP PPTs of all modules - Shanthi D.L.pdf
 
Object-Oriented Analysis and Design
Object-Oriented Analysis and DesignObject-Oriented Analysis and Design
Object-Oriented Analysis and Design
 
Software design and Architecture.pptx
Software design and Architecture.pptxSoftware design and Architecture.pptx
Software design and Architecture.pptx
 
Object Oriented Approach for Software Development
Object Oriented Approach for Software DevelopmentObject Oriented Approach for Software Development
Object Oriented Approach for Software Development
 
Design patterns
Design patternsDesign patterns
Design patterns
 
Software Architecture and Project Management module III : PATTERN OF ENTERPRISE
Software Architecture and Project Management module III : PATTERN OF ENTERPRISESoftware Architecture and Project Management module III : PATTERN OF ENTERPRISE
Software Architecture and Project Management module III : PATTERN OF ENTERPRISE
 
ap assignmnet presentation.pptx
ap assignmnet presentation.pptxap assignmnet presentation.pptx
ap assignmnet presentation.pptx
 
C# Design Patterns | Design Pattern Tutorial For Beginners | C# Programming T...
C# Design Patterns | Design Pattern Tutorial For Beginners | C# Programming T...C# Design Patterns | Design Pattern Tutorial For Beginners | C# Programming T...
C# Design Patterns | Design Pattern Tutorial For Beginners | C# Programming T...
 

Recently uploaded

Lecture Notes for computer networks subject
Lecture Notes for computer networks subjectLecture Notes for computer networks subject
Lecture Notes for computer networks subject
ssuseree48e0
 
IWISS Catalog 2024
IWISS Catalog 2024IWISS Catalog 2024
IWISS Catalog 2024
Iwiss Tools Co.,Ltd
 
一比一原版(skku毕业证)韩国成均馆大学毕业证如何办理
一比一原版(skku毕业证)韩国成均馆大学毕业证如何办理一比一原版(skku毕业证)韩国成均馆大学毕业证如何办理
一比一原版(skku毕业证)韩国成均馆大学毕业证如何办理
hahehot
 
一比一原版(csulb文凭证书)美国加州州立大学长滩分校毕业证如何办理
一比一原版(csulb文凭证书)美国加州州立大学长滩分校毕业证如何办理一比一原版(csulb文凭证书)美国加州州立大学长滩分校毕业证如何办理
一比一原版(csulb文凭证书)美国加州州立大学长滩分校毕业证如何办理
feoud
 
UNIT I INCEPTION OF INFORMATION DESIGN 20CDE09-ID
UNIT I INCEPTION OF INFORMATION DESIGN 20CDE09-IDUNIT I INCEPTION OF INFORMATION DESIGN 20CDE09-ID
UNIT I INCEPTION OF INFORMATION DESIGN 20CDE09-ID
GOWSIKRAJA PALANISAMY
 
Coroutines Flow & Channels Workshop Slides
Coroutines Flow & Channels Workshop SlidesCoroutines Flow & Channels Workshop Slides
Coroutines Flow & Channels Workshop Slides
Morteza Nedaei
 
L-3536-Cost Benifit Analysis in ESIA.pptx
L-3536-Cost Benifit Analysis in ESIA.pptxL-3536-Cost Benifit Analysis in ESIA.pptx
L-3536-Cost Benifit Analysis in ESIA.pptx
naseki5964
 
Analysis and Design of Algorithm Lab Manual (BCSL404)
Analysis and Design of Algorithm Lab Manual (BCSL404)Analysis and Design of Algorithm Lab Manual (BCSL404)
Analysis and Design of Algorithm Lab Manual (BCSL404)
VishalMore197390
 
Development of Chatbot Using AI/ML Technologies
Development of  Chatbot Using AI/ML TechnologiesDevelopment of  Chatbot Using AI/ML Technologies
Development of Chatbot Using AI/ML Technologies
maisnampibarel
 
13 tricks to get the most out of the S Pen
13 tricks to get the most out of the S Pen13 tricks to get the most out of the S Pen
13 tricks to get the most out of the S Pen
aashuverma204
 
AWS-Architecture-Icons-Deck_For-Dark-BG_04282023.pptx
AWS-Architecture-Icons-Deck_For-Dark-BG_04282023.pptxAWS-Architecture-Icons-Deck_For-Dark-BG_04282023.pptx
AWS-Architecture-Icons-Deck_For-Dark-BG_04282023.pptx
kriangkb1
 
Best Practices for Password Rotation and Tools to Streamline the Process
Best Practices for Password Rotation and Tools to Streamline the ProcessBest Practices for Password Rotation and Tools to Streamline the Process
Best Practices for Password Rotation and Tools to Streamline the Process
Bert Blevins
 
Press Tool and It's Primary Components.pdf
Press Tool and It's Primary Components.pdfPress Tool and It's Primary Components.pdf
Press Tool and It's Primary Components.pdf
Tool and Die Tech
 
kiln burning and kiln burner system for clinker
kiln burning and kiln burner system for clinkerkiln burning and kiln burner system for clinker
kiln burning and kiln burner system for clinker
hamedmustafa094
 
( Call  ) Girls Vasant Kunj Just 9873940964 High Class Model Shneha Patil
( Call  ) Girls Vasant Kunj Just 9873940964 High Class Model Shneha Patil( Call  ) Girls Vasant Kunj Just 9873940964 High Class Model Shneha Patil
( Call  ) Girls Vasant Kunj Just 9873940964 High Class Model Shneha Patil
kinni singh$A17
 
Citrix Workspace - Diagrams and Icons.pptx
Citrix Workspace - Diagrams and Icons.pptxCitrix Workspace - Diagrams and Icons.pptx
Citrix Workspace - Diagrams and Icons.pptx
kriangkb1
 
this slide shows husien hanafy portfolio 6-2024
this slide shows husien hanafy portfolio 6-2024this slide shows husien hanafy portfolio 6-2024
this slide shows husien hanafy portfolio 6-2024
hessenhanafy1
 
Profiling of Cafe Business in Talavera, Nueva Ecija: A Basis for Development ...
Profiling of Cafe Business in Talavera, Nueva Ecija: A Basis for Development ...Profiling of Cafe Business in Talavera, Nueva Ecija: A Basis for Development ...
Profiling of Cafe Business in Talavera, Nueva Ecija: A Basis for Development ...
IJAEMSJORNAL
 
DESIGN OF BEARINGS ANJANEYULU bridge bearing
DESIGN OF BEARINGS ANJANEYULU bridge bearingDESIGN OF BEARINGS ANJANEYULU bridge bearing
DESIGN OF BEARINGS ANJANEYULU bridge bearing
GokulKannan194051
 
Germany Offshore Wind 010724 RE (1) 2 test.pptx
Germany Offshore Wind 010724 RE (1) 2 test.pptxGermany Offshore Wind 010724 RE (1) 2 test.pptx
Germany Offshore Wind 010724 RE (1) 2 test.pptx
rebecca841358
 

Recently uploaded (20)

Lecture Notes for computer networks subject
Lecture Notes for computer networks subjectLecture Notes for computer networks subject
Lecture Notes for computer networks subject
 
IWISS Catalog 2024
IWISS Catalog 2024IWISS Catalog 2024
IWISS Catalog 2024
 
一比一原版(skku毕业证)韩国成均馆大学毕业证如何办理
一比一原版(skku毕业证)韩国成均馆大学毕业证如何办理一比一原版(skku毕业证)韩国成均馆大学毕业证如何办理
一比一原版(skku毕业证)韩国成均馆大学毕业证如何办理
 
一比一原版(csulb文凭证书)美国加州州立大学长滩分校毕业证如何办理
一比一原版(csulb文凭证书)美国加州州立大学长滩分校毕业证如何办理一比一原版(csulb文凭证书)美国加州州立大学长滩分校毕业证如何办理
一比一原版(csulb文凭证书)美国加州州立大学长滩分校毕业证如何办理
 
UNIT I INCEPTION OF INFORMATION DESIGN 20CDE09-ID
UNIT I INCEPTION OF INFORMATION DESIGN 20CDE09-IDUNIT I INCEPTION OF INFORMATION DESIGN 20CDE09-ID
UNIT I INCEPTION OF INFORMATION DESIGN 20CDE09-ID
 
Coroutines Flow & Channels Workshop Slides
Coroutines Flow & Channels Workshop SlidesCoroutines Flow & Channels Workshop Slides
Coroutines Flow & Channels Workshop Slides
 
L-3536-Cost Benifit Analysis in ESIA.pptx
L-3536-Cost Benifit Analysis in ESIA.pptxL-3536-Cost Benifit Analysis in ESIA.pptx
L-3536-Cost Benifit Analysis in ESIA.pptx
 
Analysis and Design of Algorithm Lab Manual (BCSL404)
Analysis and Design of Algorithm Lab Manual (BCSL404)Analysis and Design of Algorithm Lab Manual (BCSL404)
Analysis and Design of Algorithm Lab Manual (BCSL404)
 
Development of Chatbot Using AI/ML Technologies
Development of  Chatbot Using AI/ML TechnologiesDevelopment of  Chatbot Using AI/ML Technologies
Development of Chatbot Using AI/ML Technologies
 
13 tricks to get the most out of the S Pen
13 tricks to get the most out of the S Pen13 tricks to get the most out of the S Pen
13 tricks to get the most out of the S Pen
 
AWS-Architecture-Icons-Deck_For-Dark-BG_04282023.pptx
AWS-Architecture-Icons-Deck_For-Dark-BG_04282023.pptxAWS-Architecture-Icons-Deck_For-Dark-BG_04282023.pptx
AWS-Architecture-Icons-Deck_For-Dark-BG_04282023.pptx
 
Best Practices for Password Rotation and Tools to Streamline the Process
Best Practices for Password Rotation and Tools to Streamline the ProcessBest Practices for Password Rotation and Tools to Streamline the Process
Best Practices for Password Rotation and Tools to Streamline the Process
 
Press Tool and It's Primary Components.pdf
Press Tool and It's Primary Components.pdfPress Tool and It's Primary Components.pdf
Press Tool and It's Primary Components.pdf
 
kiln burning and kiln burner system for clinker
kiln burning and kiln burner system for clinkerkiln burning and kiln burner system for clinker
kiln burning and kiln burner system for clinker
 
( Call  ) Girls Vasant Kunj Just 9873940964 High Class Model Shneha Patil
( Call  ) Girls Vasant Kunj Just 9873940964 High Class Model Shneha Patil( Call  ) Girls Vasant Kunj Just 9873940964 High Class Model Shneha Patil
( Call  ) Girls Vasant Kunj Just 9873940964 High Class Model Shneha Patil
 
Citrix Workspace - Diagrams and Icons.pptx
Citrix Workspace - Diagrams and Icons.pptxCitrix Workspace - Diagrams and Icons.pptx
Citrix Workspace - Diagrams and Icons.pptx
 
this slide shows husien hanafy portfolio 6-2024
this slide shows husien hanafy portfolio 6-2024this slide shows husien hanafy portfolio 6-2024
this slide shows husien hanafy portfolio 6-2024
 
Profiling of Cafe Business in Talavera, Nueva Ecija: A Basis for Development ...
Profiling of Cafe Business in Talavera, Nueva Ecija: A Basis for Development ...Profiling of Cafe Business in Talavera, Nueva Ecija: A Basis for Development ...
Profiling of Cafe Business in Talavera, Nueva Ecija: A Basis for Development ...
 
DESIGN OF BEARINGS ANJANEYULU bridge bearing
DESIGN OF BEARINGS ANJANEYULU bridge bearingDESIGN OF BEARINGS ANJANEYULU bridge bearing
DESIGN OF BEARINGS ANJANEYULU bridge bearing
 
Germany Offshore Wind 010724 RE (1) 2 test.pptx
Germany Offshore Wind 010724 RE (1) 2 test.pptxGermany Offshore Wind 010724 RE (1) 2 test.pptx
Germany Offshore Wind 010724 RE (1) 2 test.pptx
 

Design Pattern in Software Engineering

  • 1. 1 Gul Sher Ali BS(Hons) CS - UOG MS(CS & Tech.)-China Software Engineering II(CS-552) ______________________________________________________ GIMS- PMAS Arid Agriculture University, Gujrat Campus
  • 2. Design Pattern  In software engineering, a design pattern is a general repeatable solution to a commonly occurring problem in software design.[1] Figure : 1 Design Patterns[4]
  • 3. Uses of Design Patterns Design patterns can speed up the development process by providing tested, proven development paradigms.  Effective software design requires considering issues that may not become visible until later in the implementation.  Reusing design patterns helps to prevent subtle issues that can cause major problems and improves code readability for coders and architects familiar with the patterns.
  • 4. Types of Design Pattern In Software Engineering Creational Patterns Structural Patterns Behavioral Patterns
  • 5. Creational Design Patterns In software engineering, creational design patterns are design patterns that deal with object creation mechanisms, trying to create objects in a manner suitable to the situation.
  • 6. Types of Creational design Patterns Abstract Factory Builder Factory Method Prototype Singleton
  • 7. Abstract Factory  Provide an interface for creating families of related or dependent objects without specifying their concrete classes.[4] Figure : 2 Abstract Factory [4]
  • 8. Builder  Separate the construction of a complex object from its representation so that the same construction process can create different representations.[5] Figure : 3 Builder [3]
  • 9. Factory method  Define an interface for creating an object, but let subclasses decide which class to instantiate. Factory Method lets a class defer instantiation to subclasses.[5] Figure : 4 Factory Method [4]
  • 10. Prototype Start with an initialized and instantiated class and copy or clones it to make new instances rather than creating to a new instances.[5]
  • 11. Singleton A class of which only a single instance can exist and provide a global point of access to it.[5]
  • 12. Structural Pattern These concern class and object composition. They use inheritance to compose interfaces and define ways to compose objects to obtain new functionality.
  • 13. Types of Structural Pattern Adapter Bridge Composite Decorator Façade Flyweight Proxy
  • 14. Adapter  Adapter allows classes with incompatible interfaces to work together by wrapping its own interface around that of an already existing class.[4] Figure 5: Adapter Pattern[4]
  • 15. Bridge  Bridge pattern intended to keep the interface to your client program constant while allowing you to change the actual kind of class you display or used. You can then change the interface and underline class separately.[5]  A household switch controlling lights, ceiling fans, etc. is an example of the Bridge.[3]
  • 16. Composite  The Composite composes objects into tree structures, and lets clients treat individual objects and compositions uniformly.[3]
  • 17. Decorator  A Class that surrounds a given class, adds new capabilities to it, and passes all the unchanged methods to the underlying class.[5] Figure 7: Decorator Pattern[4]
  • 18. Facade Facade provides a simplified interface to a large body of code.[6] Figure 8: Facade Pattern[4]
  • 19. Flyweight Reduces the cost of creating and manipulating a large number of similar objects. It provides a way to limit the proliferation of small similar class instances by moving some of class data outside the class and passing it in during various execution method.
  • 20. Proxy Provides a placeholder for another object to control access, reduce cost, and reduce complexity.
  • 21. Behavioral Patterns Most of these design patterns are specifically concerned with communication between objects.
  • 22. Types of Behavioral Pattern Chain of Responsibility Command Interpreter Iteretor Mediator Observer State Strategy Template Method Visitor
  • 23. Chain of Responsibility The main purpose of this pattern is to reduce coupling between objects and object only need to know how to forward the request to other objects.
  • 24. Command It encapsulates a request as an object there by letting you parameterized other objects with different request, queue or log request and support undoable operations. Figure 9: Command Pattern[4
  • 25. Interpreter Interpreter provides a definition of how to include language elements in a program.
  • 26. Iterator Accesses the elements of an object sequentially without exposing its underlying representation.
  • 27. Mediator Allows loose coupling between classes by being the only class that has detailed knowledge of their methods.
  • 28. Observer Observer is a publish/subscribe pattern which allows a number of observer objects to see an event. Figure 10: Observer Pattern[4]
  • 29. State State allows an object to alter its behavior when its internal state changes.
  • 30. Strategy Strategy allows one of a family of algorithms to be selected on-the-fly at runtime.
  • 31. Template Method  Template method defines the skeleton of an algorithm as an abstract class, allowing its subclasses to provide concrete behavior. Figure 11: Template Pattern[4]
  • 32. Visitor separates an algorithm from an object structure by moving the hierarchy of methods into one object.
  • 33. Memento Pattern If you want to save the internal state of an object so you can restore it later ideally it should be possible to save and restore this state without making the object itself take care of this task. Figure : 12 Memento Pattern[3]