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

Design Patterns
Design PatternsDesign Patterns
Design Patternssoms_1
 
Design Patterns - General Introduction
Design Patterns - General IntroductionDesign Patterns - General Introduction
Design Patterns - General IntroductionAsma CHERIF
 
Gof design pattern
Gof design patternGof design pattern
Gof design patternnaveen kumar
 
Design Pattern For C# Part 1
Design Pattern For C# Part 1Design Pattern For C# Part 1
Design Pattern For C# Part 1Shahzad
 
Java Design Patterns Tutorial | Edureka
Java Design Patterns Tutorial | EdurekaJava Design Patterns Tutorial | Edureka
Java Design Patterns Tutorial | EdurekaEdureka!
 
Object oriented analysis
Object oriented analysisObject oriented analysis
Object oriented analysisMahesh Bhalerao
 
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
 
Design Concept software engineering
Design Concept software engineeringDesign Concept software engineering
Design Concept software engineeringDarshit Metaliya
 
Software Engineering - chp4- design patterns
Software Engineering - chp4- design patternsSoftware Engineering - chp4- design patterns
Software Engineering - chp4- design patternsLilia Sfaxi
 
Java Course 11: Design Patterns
Java Course 11: Design PatternsJava Course 11: Design Patterns
Java Course 11: Design PatternsAnton Keks
 

What's hot (20)

Design patterns
Design patternsDesign patterns
Design patterns
 
Design Pattern
Design PatternDesign Pattern
Design Pattern
 
Design Patterns
Design PatternsDesign Patterns
Design Patterns
 
Design Patterns - General Introduction
Design Patterns - General IntroductionDesign Patterns - General Introduction
Design Patterns - General Introduction
 
Gof design pattern
Gof design patternGof design pattern
Gof design pattern
 
Ooad unit – 1 introduction
Ooad unit – 1 introductionOoad unit – 1 introduction
Ooad unit – 1 introduction
 
Software Design Patterns
Software Design PatternsSoftware Design Patterns
Software Design Patterns
 
Object-oriented concepts
Object-oriented conceptsObject-oriented concepts
Object-oriented concepts
 
Design Pattern For C# Part 1
Design Pattern For C# Part 1Design Pattern For C# Part 1
Design Pattern For C# Part 1
 
Java Design Patterns Tutorial | Edureka
Java Design Patterns Tutorial | EdurekaJava Design Patterns Tutorial | Edureka
Java Design Patterns Tutorial | Edureka
 
Object oriented analysis
Object oriented analysisObject oriented analysis
Object oriented analysis
 
Unified Modeling Language
Unified Modeling LanguageUnified Modeling Language
Unified Modeling Language
 
OOP Introduction with java programming language
OOP Introduction with java programming languageOOP Introduction with java programming language
OOP Introduction with java programming language
 
C# Private assembly
C# Private assemblyC# Private assembly
C# Private assembly
 
Design Concept software engineering
Design Concept software engineeringDesign Concept software engineering
Design Concept software engineering
 
Software Engineering Practice
Software Engineering PracticeSoftware Engineering Practice
Software Engineering Practice
 
Software Engineering - chp4- design patterns
Software Engineering - chp4- design patternsSoftware Engineering - chp4- design patterns
Software Engineering - chp4- design patterns
 
UML Diagrams
UML DiagramsUML Diagrams
UML Diagrams
 
Design patterns tutorials
Design patterns tutorialsDesign patterns tutorials
Design patterns tutorials
 
Java Course 11: Design Patterns
Java Course 11: Design PatternsJava Course 11: Design Patterns
Java Course 11: Design Patterns
 

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

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
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
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
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
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
 
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
 
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
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
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
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
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
 
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
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 

Recently uploaded (20)

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
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
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...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
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
 
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
 
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...
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
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
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 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/