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

Introduction to design patterns
Introduction to design patternsIntroduction to design patterns
Introduction to design patternsAmit Kabra
 
Design Patterns - General Introduction
Design Patterns - General IntroductionDesign Patterns - General Introduction
Design Patterns - General IntroductionAsma CHERIF
 
Singleton design pattern
Singleton design patternSingleton design pattern
Singleton design pattern11prasoon
 
Design Pattern in Software Engineering
Design Pattern in Software EngineeringDesign Pattern in Software Engineering
Design Pattern in Software EngineeringManish Kumar
 
Creational pattern
Creational patternCreational pattern
Creational patternHimanshu
 
The Singleton Pattern Presentation
The Singleton Pattern PresentationThe Singleton Pattern Presentation
The Singleton Pattern PresentationJAINIK PATEL
 
Design Pattern - Singleton Pattern
Design Pattern - Singleton PatternDesign Pattern - Singleton Pattern
Design Pattern - Singleton PatternMudasir Qazi
 
Design pattern & categories
Design pattern & categoriesDesign pattern & categories
Design pattern & categoriesHimanshu
 
Software Engineering - chp4- design patterns
Software Engineering - chp4- design patternsSoftware Engineering - chp4- design patterns
Software Engineering - chp4- design patternsLilia Sfaxi
 
Command Design Pattern
Command Design PatternCommand Design Pattern
Command Design PatternShahriar Hyder
 
Java Course 11: Design Patterns
Java Course 11: Design PatternsJava Course 11: Design Patterns
Java Course 11: Design PatternsAnton Keks
 
Software design patterns ppt
Software design patterns pptSoftware design patterns ppt
Software design patterns pptmkruthika
 
Design Pattern - Factory Method Pattern
Design Pattern - Factory Method PatternDesign Pattern - Factory Method Pattern
Design Pattern - Factory Method PatternMudasir Qazi
 
Software Process Models
Software Process ModelsSoftware Process Models
Software Process ModelsHassan A-j
 

What's hot (20)

Introduction to design patterns
Introduction to design patternsIntroduction to design patterns
Introduction to design patterns
 
Design pattern-presentation
Design pattern-presentationDesign pattern-presentation
Design pattern-presentation
 
Design Patterns - General Introduction
Design Patterns - General IntroductionDesign Patterns - General Introduction
Design Patterns - General Introduction
 
Singleton design pattern
Singleton design patternSingleton design pattern
Singleton design pattern
 
Design Pattern in Software Engineering
Design Pattern in Software EngineeringDesign Pattern in Software Engineering
Design Pattern in Software Engineering
 
Creational pattern
Creational patternCreational pattern
Creational pattern
 
The Singleton Pattern Presentation
The Singleton Pattern PresentationThe Singleton Pattern Presentation
The Singleton Pattern Presentation
 
Design Pattern - Singleton Pattern
Design Pattern - Singleton PatternDesign Pattern - Singleton Pattern
Design Pattern - Singleton Pattern
 
Design pattern & categories
Design pattern & categoriesDesign pattern & categories
Design pattern & categories
 
Software Engineering - chp4- design patterns
Software Engineering - chp4- design patternsSoftware Engineering - chp4- design patterns
Software Engineering - chp4- design patterns
 
Design Pattern
Design PatternDesign Pattern
Design Pattern
 
Command Design Pattern
Command Design PatternCommand Design Pattern
Command Design Pattern
 
Java Course 11: Design Patterns
Java Course 11: Design PatternsJava Course 11: Design Patterns
Java Course 11: Design Patterns
 
Software design patterns ppt
Software design patterns pptSoftware design patterns ppt
Software design patterns ppt
 
Software Architecture
Software ArchitectureSoftware Architecture
Software Architecture
 
Design Pattern - Factory Method Pattern
Design Pattern - Factory Method PatternDesign Pattern - Factory Method Pattern
Design Pattern - Factory Method Pattern
 
Unit 4
Unit 4Unit 4
Unit 4
 
Software Process Models
Software Process ModelsSoftware Process Models
Software Process Models
 
Unified process Model
Unified process ModelUnified process Model
Unified process Model
 
Design patterns tutorials
Design patterns tutorialsDesign patterns tutorials
Design patterns tutorials
 

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

Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
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
 
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
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
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
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - 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
 
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
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Principled Technologies
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 

Recently uploaded (20)

Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
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
 
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
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - 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...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - 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
 
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
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 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/