SlideShare a Scribd company logo
1 of 18
Design Patterns
Optimizing OOPs Technology.
Aman Jain
Application Engineer,
Meritech Software Pvt. Ltd.
Gang of Four
o Pattern-based design was introduced
into architecture and engineering in
the 1950's
o It wasn't until a group of four
researchers combined forces that
pattern-based design became well-
known and commonplace
o This group was known as the gang of four (GoF)
Gang of Four
o The gang of four (GoF) is:
o Erich Gamma
o Richard Helm
o Ralph Johnson
o John Vlissides
o They are the authors of the famous
text "Design Patterns: Elements of
Reusable Object-Oriented Software"
Pattern??
o A pattern is a recurring solution to a
standard problem, in a context.
o A pattern is a three-part rule, which
expresses a relation between a
certain context, a problem, and a
solution.
Design Pattern Advantages
o Using patterns offers a few key
advantages:
o Facilitate a proven solution
o Provide a common vocabulary
Types of Patterns
o Creational patterns
o Deal with initializing and configuring classes and
objects.
o Structural patterns
o Deal with decoupling interface and
implementation of classes and objects
o Composition of classes or objects
o Behavioural patterns
o Deal with dynamic interactions among societies
of classes and objects.
o Distribute responsibility.
Creational Design Patterns
o Abstract Factory
o Factory for building related objects
o Builder
o Separates an object construction from its
representation.
o Factory Method
o Creates an instance of several derived classes.
o Prototype
o Factory for cloning new instances from a
prototype.
o Singleton
o A class of which a single object can exist.
Structural Patterns
o Adapter
o Match interfaces of different classes.
o Bridge
o Separates an Object’s interface from its
implementation.
o Composite
o A tree structure of simple and composite objects.
o Decorator
o Add responsibilities of Objects dynamically.
o Facade
o A single class that represents the entire
subsystem.
Structural Patterns(Cont.)
o Flyweight
o A fine-grained objects shared efficiently
o Proxy
o An Object representing another Object.
Behavioural Patterns
o Chain of Responsibility
o Passes a request between a chain of Objects.
o Command
o Encapsulate a command request as an object.
o Iterator
o Elements of a collection are accessed
sequentially.
o Interpreter
o Language elements are included.
o Mediator
o Defines simplified communication between
classes.
Behavioural Patterns(Cont.)
o Memento
o Capture and restores an object’s internal state.
o Observer
o A way of notifying change to a number of
classes.
o State
o Alter an object’s behaviour when its state
changes.
o Strategy
o Encapsulates an algorithm inside a class.
o Template Method
o Defer the exact steps of an algorithm to a
subclass.
Behavioural Patterns(Cont.)
o Visitor
o Defines a new operation to a class without
change.
Design Pattern Space
Chain of
responsibility
Command
Iterator
Mediator
Memento
Observer
State
Strategy
Visitor
Adapter
(object)
Bridge
Composite
Decorator
Façade
Flyweight
Proxy
Abstract
factory
Builder
Prototype
Singleton
Object
Interpreter
Template method
Adapter
(class)
Factory
method
ClassScope
BehaviouralStructuralCreational
Purpose
Benefits of Design Patterns
o Design patterns enable large-
scale reuse of software
architectures and also help
document systems.
o Patterns help improve developer
communication.
o Pattern names form a common
vocabulary.
o Patterns help ease the transition
to Object Oriented technology.
Drawbacks of Design Patterns
o Patterns do not lead to direct
code reuse.
o Patterns are deceptively simple.
o Teams may suffer from pattern
overload.
o Patterns are validated by
experience and discussion rather
than by automated testing.
o Integrating patterns is a human-
intensive activity.
Suggestions for Effective Use
o Do not recast everything as a
pattern
o Instead, develop strategic domain patterns and
reuse existing tactical patterns.
o Clearly document when patterns
apply and do not apply.
o Directly involve pattern authors
with application developers and
domain experts.
References
o http://www.dofactory.com/
o B. Cheng – Michigan State
University.
o http://www.dotnetiq.com/
Thank You!

More Related Content

What's hot

Java Course 11: Design Patterns
Java Course 11: Design PatternsJava Course 11: Design Patterns
Java Course 11: Design PatternsAnton Keks
 
Design Patterns - General Introduction
Design Patterns - General IntroductionDesign Patterns - General Introduction
Design Patterns - General IntroductionAsma CHERIF
 
Software Engineering - chp4- design patterns
Software Engineering - chp4- design patternsSoftware Engineering - chp4- design patterns
Software Engineering - chp4- design patternsLilia Sfaxi
 
Creational pattern
Creational patternCreational pattern
Creational patternHimanshu
 
Java Design Patterns Tutorial | Edureka
Java Design Patterns Tutorial | EdurekaJava Design Patterns Tutorial | Edureka
Java Design Patterns Tutorial | EdurekaEdureka!
 
Software design patterns ppt
Software design patterns pptSoftware design patterns ppt
Software design patterns pptmkruthika
 
Design Patterns
Design PatternsDesign Patterns
Design Patternssoms_1
 
Object Oriented Design in Software Engineering SE12
Object Oriented Design in Software Engineering SE12Object Oriented Design in Software Engineering SE12
Object Oriented Design in Software Engineering SE12koolkampus
 
The Singleton Pattern Presentation
The Singleton Pattern PresentationThe Singleton Pattern Presentation
The Singleton Pattern PresentationJAINIK PATEL
 
object oriented methodologies
object oriented methodologiesobject oriented methodologies
object oriented methodologiesAmith Tiwari
 
Overview of UML Diagrams
Overview of UML DiagramsOverview of UML Diagrams
Overview of UML DiagramsManish Kumar
 
Design patterns creational patterns
Design patterns creational patternsDesign patterns creational patterns
Design patterns creational patternsMalik Sajid
 
Design Pattern - Singleton Pattern
Design Pattern - Singleton PatternDesign Pattern - Singleton Pattern
Design Pattern - Singleton PatternMudasir Qazi
 

What's hot (20)

Java Course 11: Design Patterns
Java Course 11: Design PatternsJava Course 11: Design Patterns
Java Course 11: Design Patterns
 
Design Patterns - General Introduction
Design Patterns - General IntroductionDesign Patterns - General Introduction
Design Patterns - General Introduction
 
Software Engineering - chp4- design patterns
Software Engineering - chp4- design patternsSoftware Engineering - chp4- design patterns
Software Engineering - chp4- design patterns
 
Software Design Patterns
Software Design PatternsSoftware Design Patterns
Software Design Patterns
 
Design patterns tutorials
Design patterns tutorialsDesign patterns tutorials
Design patterns tutorials
 
Creational pattern
Creational patternCreational pattern
Creational pattern
 
Java Design Patterns Tutorial | Edureka
Java Design Patterns Tutorial | EdurekaJava Design Patterns Tutorial | Edureka
Java Design Patterns Tutorial | Edureka
 
Software design patterns ppt
Software design patterns pptSoftware design patterns ppt
Software design patterns ppt
 
Design Pattern
Design PatternDesign Pattern
Design Pattern
 
Design Patterns
Design PatternsDesign Patterns
Design Patterns
 
Facade pattern
Facade patternFacade pattern
Facade pattern
 
Object Oriented Design
Object Oriented DesignObject Oriented Design
Object Oriented Design
 
Object Oriented Design in Software Engineering SE12
Object Oriented Design in Software Engineering SE12Object Oriented Design in Software Engineering SE12
Object Oriented Design in Software Engineering SE12
 
The Singleton Pattern Presentation
The Singleton Pattern PresentationThe Singleton Pattern Presentation
The Singleton Pattern Presentation
 
object oriented methodologies
object oriented methodologiesobject oriented methodologies
object oriented methodologies
 
Overview of UML Diagrams
Overview of UML DiagramsOverview of UML Diagrams
Overview of UML Diagrams
 
Prototype pattern
Prototype patternPrototype pattern
Prototype pattern
 
UML
UMLUML
UML
 
Design patterns creational patterns
Design patterns creational patternsDesign patterns creational patterns
Design patterns creational patterns
 
Design Pattern - Singleton Pattern
Design Pattern - Singleton PatternDesign Pattern - Singleton Pattern
Design Pattern - Singleton Pattern
 

Viewers also liked

Design Pattern
Design PatternDesign Pattern
Design PatternHimanshu
 
Security and Integrity of Data
Security and Integrity of DataSecurity and Integrity of Data
Security and Integrity of DataAdeel Riaz
 
Behavioral pattern By:-Priyanka Pradhan
Behavioral pattern By:-Priyanka PradhanBehavioral pattern By:-Priyanka Pradhan
Behavioral pattern By:-Priyanka PradhanPriyanka Pradhan
 
Adapter Design Pattern
Adapter Design PatternAdapter Design Pattern
Adapter Design PatternAdeel Riaz
 
Adapter Design Pattern
Adapter Design PatternAdapter Design Pattern
Adapter Design Patternguy_davis
 
Structural patterns
Structural patternsStructural patterns
Structural patternsHimanshu
 

Viewers also liked (6)

Design Pattern
Design PatternDesign Pattern
Design Pattern
 
Security and Integrity of Data
Security and Integrity of DataSecurity and Integrity of Data
Security and Integrity of Data
 
Behavioral pattern By:-Priyanka Pradhan
Behavioral pattern By:-Priyanka PradhanBehavioral pattern By:-Priyanka Pradhan
Behavioral pattern By:-Priyanka Pradhan
 
Adapter Design Pattern
Adapter Design PatternAdapter Design Pattern
Adapter Design Pattern
 
Adapter Design Pattern
Adapter Design PatternAdapter Design Pattern
Adapter Design Pattern
 
Structural patterns
Structural patternsStructural patterns
Structural patterns
 

Similar to Design patterns ppt

Basic design pattern interview questions
Basic design pattern interview questionsBasic design pattern interview questions
Basic design pattern interview questionsjinaldesailive
 
Methods for Ontology Design Patterns reuse
Methods for Ontology Design Patterns reuseMethods for Ontology Design Patterns reuse
Methods for Ontology Design Patterns reuseValentina Presutti
 
Software design and Architecture.pptx
Software design and Architecture.pptxSoftware design and Architecture.pptx
Software design and Architecture.pptxSHAHZAIBABBAS13
 
Unit No 6 Design Patterns.pptx
Unit No 6 Design Patterns.pptxUnit No 6 Design Patterns.pptx
Unit No 6 Design Patterns.pptxDrYogeshDeshmukh1
 
Design Patterns (by Joel Funu at DevCongress 2013)
Design Patterns (by Joel Funu at DevCongress 2013)Design Patterns (by Joel Funu at DevCongress 2013)
Design Patterns (by Joel Funu at DevCongress 2013)DevCongress
 
Design patterns - How much we understand and know ??
Design patterns - How much we understand and know ??Design patterns - How much we understand and know ??
Design patterns - How much we understand and know ??Vinay Raj
 
Ooad lab manual
Ooad  lab manualOoad  lab manual
Ooad lab manualPraseela R
 
Java OOPs Concepts.docx
Java OOPs Concepts.docxJava OOPs Concepts.docx
Java OOPs Concepts.docxFredWauyo
 
Final sdp ppt
Final sdp pptFinal sdp ppt
Final sdp pptnancy_17
 
Women Who Code Belfast: Introduction to Design patterns
Women Who Code Belfast: Introduction to Design patternsWomen Who Code Belfast: Introduction to Design patterns
Women Who Code Belfast: Introduction to Design patternsJackie Pollock
 
Experimenting with eXtreme Design (EKAW2010)
Experimenting with eXtreme Design (EKAW2010)Experimenting with eXtreme Design (EKAW2010)
Experimenting with eXtreme Design (EKAW2010)evabl444
 
Design Patterns
Design PatternsDesign Patterns
Design Patternsppd1961
 
SWSN UNIT-3.pptx we can information about swsn professional
SWSN UNIT-3.pptx we can information about swsn professionalSWSN UNIT-3.pptx we can information about swsn professional
SWSN UNIT-3.pptx we can information about swsn professionalgowthamnaidu0986
 
12266422.ppt
12266422.ppt12266422.ppt
12266422.pptCSEC5
 
ONTOLOGY BASED DATA ACCESS
ONTOLOGY BASED DATA ACCESSONTOLOGY BASED DATA ACCESS
ONTOLOGY BASED DATA ACCESSKishan Patel
 

Similar to Design patterns ppt (20)

Basic design pattern interview questions
Basic design pattern interview questionsBasic design pattern interview questions
Basic design pattern interview questions
 
Oops design pattern_amitgupta
Oops design pattern_amitguptaOops design pattern_amitgupta
Oops design pattern_amitgupta
 
Methods for Ontology Design Patterns reuse
Methods for Ontology Design Patterns reuseMethods for Ontology Design Patterns reuse
Methods for Ontology Design Patterns reuse
 
Software design and Architecture.pptx
Software design and Architecture.pptxSoftware design and Architecture.pptx
Software design and Architecture.pptx
 
010821+presentation+oti.ppt
010821+presentation+oti.ppt010821+presentation+oti.ppt
010821+presentation+oti.ppt
 
Unit No 6 Design Patterns.pptx
Unit No 6 Design Patterns.pptxUnit No 6 Design Patterns.pptx
Unit No 6 Design Patterns.pptx
 
Design Patterns (by Joel Funu at DevCongress 2013)
Design Patterns (by Joel Funu at DevCongress 2013)Design Patterns (by Joel Funu at DevCongress 2013)
Design Patterns (by Joel Funu at DevCongress 2013)
 
Design patterns - How much we understand and know ??
Design patterns - How much we understand and know ??Design patterns - How much we understand and know ??
Design patterns - How much we understand and know ??
 
10-DesignPatterns.ppt
10-DesignPatterns.ppt10-DesignPatterns.ppt
10-DesignPatterns.ppt
 
Ooad lab manual
Ooad  lab manualOoad  lab manual
Ooad lab manual
 
Java OOPs Concepts.docx
Java OOPs Concepts.docxJava OOPs Concepts.docx
Java OOPs Concepts.docx
 
Design Patterns.ppt
Design Patterns.pptDesign Patterns.ppt
Design Patterns.ppt
 
Ontology
OntologyOntology
Ontology
 
Final sdp ppt
Final sdp pptFinal sdp ppt
Final sdp ppt
 
Women Who Code Belfast: Introduction to Design patterns
Women Who Code Belfast: Introduction to Design patternsWomen Who Code Belfast: Introduction to Design patterns
Women Who Code Belfast: Introduction to Design patterns
 
Experimenting with eXtreme Design (EKAW2010)
Experimenting with eXtreme Design (EKAW2010)Experimenting with eXtreme Design (EKAW2010)
Experimenting with eXtreme Design (EKAW2010)
 
Design Patterns
Design PatternsDesign Patterns
Design Patterns
 
SWSN UNIT-3.pptx we can information about swsn professional
SWSN UNIT-3.pptx we can information about swsn professionalSWSN UNIT-3.pptx we can information about swsn professional
SWSN UNIT-3.pptx we can information about swsn professional
 
12266422.ppt
12266422.ppt12266422.ppt
12266422.ppt
 
ONTOLOGY BASED DATA ACCESS
ONTOLOGY BASED DATA ACCESSONTOLOGY BASED DATA ACCESS
ONTOLOGY BASED DATA ACCESS
 

Recently uploaded

Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 

Recently uploaded (20)

Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 

Design patterns ppt

  • 1. Design Patterns Optimizing OOPs Technology. Aman Jain Application Engineer, Meritech Software Pvt. Ltd.
  • 2. Gang of Four o Pattern-based design was introduced into architecture and engineering in the 1950's o It wasn't until a group of four researchers combined forces that pattern-based design became well- known and commonplace o This group was known as the gang of four (GoF)
  • 3. Gang of Four o The gang of four (GoF) is: o Erich Gamma o Richard Helm o Ralph Johnson o John Vlissides o They are the authors of the famous text "Design Patterns: Elements of Reusable Object-Oriented Software"
  • 4. Pattern?? o A pattern is a recurring solution to a standard problem, in a context. o A pattern is a three-part rule, which expresses a relation between a certain context, a problem, and a solution.
  • 5. Design Pattern Advantages o Using patterns offers a few key advantages: o Facilitate a proven solution o Provide a common vocabulary
  • 6. Types of Patterns o Creational patterns o Deal with initializing and configuring classes and objects. o Structural patterns o Deal with decoupling interface and implementation of classes and objects o Composition of classes or objects o Behavioural patterns o Deal with dynamic interactions among societies of classes and objects. o Distribute responsibility.
  • 7. Creational Design Patterns o Abstract Factory o Factory for building related objects o Builder o Separates an object construction from its representation. o Factory Method o Creates an instance of several derived classes. o Prototype o Factory for cloning new instances from a prototype. o Singleton o A class of which a single object can exist.
  • 8. Structural Patterns o Adapter o Match interfaces of different classes. o Bridge o Separates an Object’s interface from its implementation. o Composite o A tree structure of simple and composite objects. o Decorator o Add responsibilities of Objects dynamically. o Facade o A single class that represents the entire subsystem.
  • 9. Structural Patterns(Cont.) o Flyweight o A fine-grained objects shared efficiently o Proxy o An Object representing another Object.
  • 10. Behavioural Patterns o Chain of Responsibility o Passes a request between a chain of Objects. o Command o Encapsulate a command request as an object. o Iterator o Elements of a collection are accessed sequentially. o Interpreter o Language elements are included. o Mediator o Defines simplified communication between classes.
  • 11. Behavioural Patterns(Cont.) o Memento o Capture and restores an object’s internal state. o Observer o A way of notifying change to a number of classes. o State o Alter an object’s behaviour when its state changes. o Strategy o Encapsulates an algorithm inside a class. o Template Method o Defer the exact steps of an algorithm to a subclass.
  • 12. Behavioural Patterns(Cont.) o Visitor o Defines a new operation to a class without change.
  • 13. Design Pattern Space Chain of responsibility Command Iterator Mediator Memento Observer State Strategy Visitor Adapter (object) Bridge Composite Decorator Façade Flyweight Proxy Abstract factory Builder Prototype Singleton Object Interpreter Template method Adapter (class) Factory method ClassScope BehaviouralStructuralCreational Purpose
  • 14. Benefits of Design Patterns o Design patterns enable large- scale reuse of software architectures and also help document systems. o Patterns help improve developer communication. o Pattern names form a common vocabulary. o Patterns help ease the transition to Object Oriented technology.
  • 15. Drawbacks of Design Patterns o Patterns do not lead to direct code reuse. o Patterns are deceptively simple. o Teams may suffer from pattern overload. o Patterns are validated by experience and discussion rather than by automated testing. o Integrating patterns is a human- intensive activity.
  • 16. Suggestions for Effective Use o Do not recast everything as a pattern o Instead, develop strategic domain patterns and reuse existing tactical patterns. o Clearly document when patterns apply and do not apply. o Directly involve pattern authors with application developers and domain experts.
  • 17. References o http://www.dofactory.com/ o B. Cheng – Michigan State University. o http://www.dotnetiq.com/