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 Presentation - Chetan Gole
Design Patterns Presentation -  Chetan GoleDesign Patterns Presentation -  Chetan Gole
Design Patterns Presentation - Chetan GoleChetan Gole
 
Design Patterns
Design PatternsDesign Patterns
Design Patternssoms_1
 
OOP Introduction with java programming language
OOP Introduction with java programming languageOOP Introduction with java programming language
OOP Introduction with java programming languageMd.Al-imran Roton
 
Software Engineering - chp4- design patterns
Software Engineering - chp4- design patternsSoftware Engineering - chp4- design patterns
Software Engineering - chp4- design patternsLilia Sfaxi
 
Software architecture Unit 1 notes
Software architecture Unit 1 notesSoftware architecture Unit 1 notes
Software architecture Unit 1 notesSudarshan Dhondaley
 
Function Oriented Design
Function Oriented DesignFunction Oriented Design
Function Oriented DesignSharath g
 
Software Architecture Patterns
Software Architecture PatternsSoftware Architecture Patterns
Software Architecture PatternsAssaf Gannon
 
Software design patterns ppt
Software design patterns pptSoftware design patterns ppt
Software design patterns pptmkruthika
 
Pressman ch-11-component-level-design
Pressman ch-11-component-level-designPressman ch-11-component-level-design
Pressman ch-11-component-level-designOliver Cheng
 
Architecture design in software engineering
Architecture design in software engineeringArchitecture design in software engineering
Architecture design in software engineeringPreeti Mishra
 
Entity Relationship Diagrams
Entity Relationship DiagramsEntity Relationship Diagrams
Entity Relationship Diagramssadique_ghitm
 
Overview of UML Diagrams
Overview of UML DiagramsOverview of UML Diagrams
Overview of UML DiagramsManish Kumar
 

What's hot (20)

Gof design patterns
Gof design patternsGof design patterns
Gof design patterns
 
Java Course 11: Design Patterns
Java Course 11: Design PatternsJava Course 11: Design Patterns
Java Course 11: Design Patterns
 
Design Patterns
Design PatternsDesign Patterns
Design Patterns
 
Design Patterns Presentation - Chetan Gole
Design Patterns Presentation -  Chetan GoleDesign Patterns Presentation -  Chetan Gole
Design Patterns Presentation - Chetan Gole
 
Design Pattern
Design PatternDesign Pattern
Design Pattern
 
Design Patterns
Design PatternsDesign Patterns
Design Patterns
 
OOP Introduction with java programming language
OOP Introduction with java programming languageOOP Introduction with java programming language
OOP Introduction with java programming language
 
Software Engineering - chp4- design patterns
Software Engineering - chp4- design patternsSoftware Engineering - chp4- design patterns
Software Engineering - chp4- design patterns
 
Software architecture Unit 1 notes
Software architecture Unit 1 notesSoftware architecture Unit 1 notes
Software architecture Unit 1 notes
 
Function Oriented Design
Function Oriented DesignFunction Oriented Design
Function Oriented Design
 
UML
UMLUML
UML
 
Software Architecture Patterns
Software Architecture PatternsSoftware Architecture Patterns
Software Architecture Patterns
 
Software design patterns ppt
Software design patterns pptSoftware design patterns ppt
Software design patterns ppt
 
Design patterns tutorials
Design patterns tutorialsDesign patterns tutorials
Design patterns tutorials
 
Pressman ch-11-component-level-design
Pressman ch-11-component-level-designPressman ch-11-component-level-design
Pressman ch-11-component-level-design
 
Architecture design in software engineering
Architecture design in software engineeringArchitecture design in software engineering
Architecture design in software engineering
 
Entity Relationship Diagrams
Entity Relationship DiagramsEntity Relationship Diagrams
Entity Relationship Diagrams
 
Software Architecture
Software ArchitectureSoftware Architecture
Software Architecture
 
OOP design patterns
OOP design patternsOOP design patterns
OOP design patterns
 
Overview of UML Diagrams
Overview of UML DiagramsOverview of UML Diagrams
Overview of UML Diagrams
 

Viewers also liked

Design Pattern
Design PatternDesign Pattern
Design PatternHimanshu
 
Creational pattern
Creational patternCreational pattern
Creational 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 (7)

Design Pattern
Design PatternDesign Pattern
Design Pattern
 
Creational pattern
Creational patternCreational pattern
Creational 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

#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetEnjoy Anytime
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Hyundai Motor Group
 

Recently uploaded (20)

#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2
 

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/