SlideShare a Scribd company logo
Presentation
        on
Design Patterns



             By
    Samundra Shrestha
Patterns
Each pattern describes a problem which occurs over and
over again in our environment and then describes the core
of the solution to that problem, in such a way that you can
use this solution a million times over, without ever doing it
the same twice.




                             - Christopher Alexander, The
                             Timeless Way of Building, 1979



          So what are patterns?
What are Patterns, really?

            Patterns catalog solutions to
            categories of problems

            They consist of
            A name
            A solution to a problem
            A description of the solution
            An assessment of the pros and
            cons of the pattern
What are Patterns Not?

1. An algorithm.
2. An implementation.
3. The same every time you see them.
Introduction to Design Patterns
Gang of Four (GOF)

    Erich Gamma, Richard Helm, Ralph Johnson,
and John Vlissides

    Authors of the original Design Patterns book


Problem in software design

    What – business and functionality requirements

    How – particular design to meet the requirements

    Work – Actual implementation, How put into practice.
Principal and Strategies
      
           Open Closed Principle
      
           Dependency Inversion
      
           Single Responsibility Policy


Why ?


  
          improve abilities as analyst and designer.
  
          tackle situation in which no design pattern can be
          applied or design pattern has not been discovered yet.
Contextual Design
Open Closed Principle (OCP)


   "Modules, methods, classes should be open for extension,
   while closed for modifications."


    
        Loose Coupling


    
        Encapsulation
Dependency Inversion Principle

    Depend on the abstractions



    Higher level module should not depend on lower
    level module. Both high and low level should depend
    on abstractions



    Abstraction should not depend on details. Details
    should depend on abstractions.
Categorization
Creational Patterns

     Abstract Factory, Builder, Factory Method,
     Prototype, Singleton

Behavioral Patterns

     Adapter, Bridge, Composite, Decorator,
     Facade, Flyweight, Proxy

Structural Patterns

     Chain of Responsibility, Command,
     Interpreter, Iterator, Mediator, Memento,
     Observer, State, Strategy, Template,
     Method, Visitor

                          Single instance in the whole application/platform
Singleton Patterns                                Patterns by Examples

Problem : Ensure a class has only one instance available in the system anytime.



                                                   Output:

                                                   Design Patterns Example
Factory Pattern                                   Patterns by Examples

dynamically create instances of multiple classes based on runtime input.




                                                  Output:

                                                  This is system generated
                                                  messageThis is console
                                                  generated message
Decorator Pattern                                     Patterns by Examples
best suited for altering or decorating portions of an existing object’s content or
functionality without modifying the structure of the original object.




                                           Output :

                                           The CD contains the following tracks:
                                           1) what-it-means. 2) brr. 3) good-bye.
Thank you :)

More Related Content

Similar to Design patterns

Design patterns
Design patternsDesign patterns
Design patterns
mudabbirwarsi
 
Module 2 design patterns-2
Module 2   design patterns-2Module 2   design patterns-2
Module 2 design patterns-2
Ankit Dubey
 
Why Design Patterns Are Important In Software Engineering
Why Design Patterns Are Important In Software EngineeringWhy Design Patterns Are Important In Software Engineering
Why Design Patterns Are Important In Software Engineering
Protelo, Inc.
 
Introduction To Design Patterns
Introduction To Design PatternsIntroduction To Design Patterns
Introduction To Design Patterns
sukumarraju6
 
Let us understand design pattern
Let us understand design patternLet us understand design pattern
Let us understand design pattern
Mindfire Solutions
 
Design Patterns
Design PatternsDesign Patterns
Design Patterns
Sergii Stets
 
Design Patterns For 70% Of Programmers In The World
Design Patterns For 70% Of Programmers In The WorldDesign Patterns For 70% Of Programmers In The World
Design Patterns For 70% Of Programmers In The World
Saurabh Moody
 
P Training Presentation
P Training PresentationP Training Presentation
P Training PresentationGaurav Tyagi
 
Cs 1023 lec 9 design pattern (week 2)
Cs 1023 lec 9 design pattern (week 2)Cs 1023 lec 9 design pattern (week 2)
Cs 1023 lec 9 design pattern (week 2)stanbridge
 
GoF Design patterns I: Introduction + Structural Patterns
GoF Design patterns I:   Introduction + Structural PatternsGoF Design patterns I:   Introduction + Structural Patterns
GoF Design patterns I: Introduction + Structural Patterns
Sameh Deabes
 
Design Patterns Presentation - Chetan Gole
Design Patterns Presentation -  Chetan GoleDesign Patterns Presentation -  Chetan Gole
Design Patterns Presentation - Chetan Gole
Chetan Gole
 
Design Patterns - General Introduction
Design Patterns - General IntroductionDesign Patterns - General Introduction
Design Patterns - General Introduction
Asma CHERIF
 
Design Pattern lecture 2
Design Pattern lecture 2Design Pattern lecture 2
Design Pattern lecture 2
Julie Iskander
 
Design pattern in android
Design pattern in androidDesign pattern in android
Design pattern in androidJay Kumarr
 
Oops design pattern intro
Oops design pattern intro Oops design pattern intro
Oops design pattern intro
anshu_atri
 
dotnet stuff.com tutorials-design-patterns_exploring-net-design-patterns-in-s...
dotnet stuff.com tutorials-design-patterns_exploring-net-design-patterns-in-s...dotnet stuff.com tutorials-design-patterns_exploring-net-design-patterns-in-s...
dotnet stuff.com tutorials-design-patterns_exploring-net-design-patterns-in-s...
Anil Sharma
 
Design pattern & categories
Design pattern & categoriesDesign pattern & categories
Design pattern & categories
Himanshu
 

Similar to Design patterns (20)

Design patterns
Design patternsDesign patterns
Design patterns
 
Module 2 design patterns-2
Module 2   design patterns-2Module 2   design patterns-2
Module 2 design patterns-2
 
Why Design Patterns Are Important In Software Engineering
Why Design Patterns Are Important In Software EngineeringWhy Design Patterns Are Important In Software Engineering
Why Design Patterns Are Important In Software Engineering
 
Introduction To Design Patterns
Introduction To Design PatternsIntroduction To Design Patterns
Introduction To Design Patterns
 
Let us understand design pattern
Let us understand design patternLet us understand design pattern
Let us understand design pattern
 
Patterns Overview
Patterns OverviewPatterns Overview
Patterns Overview
 
Design Patterns
Design PatternsDesign Patterns
Design Patterns
 
Design Patterns For 70% Of Programmers In The World
Design Patterns For 70% Of Programmers In The WorldDesign Patterns For 70% Of Programmers In The World
Design Patterns For 70% Of Programmers In The World
 
Introduction to Design Patterns
Introduction to Design PatternsIntroduction to Design Patterns
Introduction to Design Patterns
 
P Training Presentation
P Training PresentationP Training Presentation
P Training Presentation
 
Cs 1023 lec 9 design pattern (week 2)
Cs 1023 lec 9 design pattern (week 2)Cs 1023 lec 9 design pattern (week 2)
Cs 1023 lec 9 design pattern (week 2)
 
GoF Design patterns I: Introduction + Structural Patterns
GoF Design patterns I:   Introduction + Structural PatternsGoF Design patterns I:   Introduction + Structural Patterns
GoF Design patterns I: Introduction + Structural Patterns
 
Design Patterns Presentation - Chetan Gole
Design Patterns Presentation -  Chetan GoleDesign Patterns Presentation -  Chetan Gole
Design Patterns Presentation - Chetan Gole
 
Design Patterns - General Introduction
Design Patterns - General IntroductionDesign Patterns - General Introduction
Design Patterns - General Introduction
 
Design Pattern lecture 2
Design Pattern lecture 2Design Pattern lecture 2
Design Pattern lecture 2
 
Design pattern in android
Design pattern in androidDesign pattern in android
Design pattern in android
 
Oops design pattern intro
Oops design pattern intro Oops design pattern intro
Oops design pattern intro
 
dotnet stuff.com tutorials-design-patterns_exploring-net-design-patterns-in-s...
dotnet stuff.com tutorials-design-patterns_exploring-net-design-patterns-in-s...dotnet stuff.com tutorials-design-patterns_exploring-net-design-patterns-in-s...
dotnet stuff.com tutorials-design-patterns_exploring-net-design-patterns-in-s...
 
Design pattern & categories
Design pattern & categoriesDesign pattern & categories
Design pattern & categories
 
Gof design patterns
Gof design patternsGof design patterns
Gof design patterns
 

More from Prawesh Shrestha

Presentation: Follow up on hackathon - FightVAW
Presentation: Follow up on hackathon - FightVAWPresentation: Follow up on hackathon - FightVAW
Presentation: Follow up on hackathon - FightVAW
Prawesh Shrestha
 
Company registration, conduction and renewal
Company registration, conduction and renewalCompany registration, conduction and renewal
Company registration, conduction and renewal
Prawesh Shrestha
 
Orientation to Pivot Nepal Finalists
Orientation to Pivot Nepal FinalistsOrientation to Pivot Nepal Finalists
Orientation to Pivot Nepal Finalists
Prawesh Shrestha
 
Business plan and presentation iii - financials and risk
Business plan and presentation   iii - financials and riskBusiness plan and presentation   iii - financials and risk
Business plan and presentation iii - financials and riskPrawesh Shrestha
 
Business plan and presentation ii - marketing and operations
Business plan and presentation   ii - marketing and operationsBusiness plan and presentation   ii - marketing and operations
Business plan and presentation ii - marketing and operationsPrawesh Shrestha
 
Business plan and presentation i - concept-growth-risk
Business plan and presentation   i - concept-growth-riskBusiness plan and presentation   i - concept-growth-risk
Business plan and presentation i - concept-growth-risk
Prawesh Shrestha
 
Technology Entrepreneurship - Making Business Sense
Technology Entrepreneurship - Making Business SenseTechnology Entrepreneurship - Making Business Sense
Technology Entrepreneurship - Making Business Sense
Prawesh Shrestha
 
Pivot Nepal - Presentation
Pivot Nepal - PresentationPivot Nepal - Presentation
Pivot Nepal - Presentation
Prawesh Shrestha
 
Swktm gdg presentation v1.0
Swktm gdg presentation v1.0Swktm gdg presentation v1.0
Swktm gdg presentation v1.0
Prawesh Shrestha
 
I os 101:basic training rajan
I os 101:basic training   rajanI os 101:basic training   rajan
I os 101:basic training rajan
Prawesh Shrestha
 
GSMA mWomen design challenge 2012
GSMA mWomen design challenge 2012GSMA mWomen design challenge 2012
GSMA mWomen design challenge 2012
Prawesh Shrestha
 
Introduction to fragments in android
Introduction to fragments in androidIntroduction to fragments in android
Introduction to fragments in android
Prawesh Shrestha
 
N locate - market perspective
N locate - market perspectiveN locate - market perspective
N locate - market perspective
Prawesh Shrestha
 
Nepal load shedding apps
Nepal load shedding appsNepal load shedding apps
Nepal load shedding apps
Prawesh Shrestha
 
Introduction to android
Introduction to androidIntroduction to android
Introduction to android
Prawesh Shrestha
 
Ncell's scheme
Ncell's schemeNcell's scheme
Ncell's scheme
Prawesh Shrestha
 
Android trainingforbeginners
Android trainingforbeginnersAndroid trainingforbeginners
Android trainingforbeginners
Prawesh Shrestha
 
Scooba talk about your apps - vol 2
Scooba   talk about your apps - vol 2Scooba   talk about your apps - vol 2
Scooba talk about your apps - vol 2Prawesh Shrestha
 
Software quality and mobile apps
Software quality and mobile appsSoftware quality and mobile apps
Software quality and mobile appsPrawesh Shrestha
 

More from Prawesh Shrestha (20)

Presentation: Follow up on hackathon - FightVAW
Presentation: Follow up on hackathon - FightVAWPresentation: Follow up on hackathon - FightVAW
Presentation: Follow up on hackathon - FightVAW
 
Company registration, conduction and renewal
Company registration, conduction and renewalCompany registration, conduction and renewal
Company registration, conduction and renewal
 
Orientation to Pivot Nepal Finalists
Orientation to Pivot Nepal FinalistsOrientation to Pivot Nepal Finalists
Orientation to Pivot Nepal Finalists
 
Business plan and presentation iii - financials and risk
Business plan and presentation   iii - financials and riskBusiness plan and presentation   iii - financials and risk
Business plan and presentation iii - financials and risk
 
Business plan and presentation ii - marketing and operations
Business plan and presentation   ii - marketing and operationsBusiness plan and presentation   ii - marketing and operations
Business plan and presentation ii - marketing and operations
 
Business plan and presentation i - concept-growth-risk
Business plan and presentation   i - concept-growth-riskBusiness plan and presentation   i - concept-growth-risk
Business plan and presentation i - concept-growth-risk
 
Technology Entrepreneurship - Making Business Sense
Technology Entrepreneurship - Making Business SenseTechnology Entrepreneurship - Making Business Sense
Technology Entrepreneurship - Making Business Sense
 
Pivot Nepal - Presentation
Pivot Nepal - PresentationPivot Nepal - Presentation
Pivot Nepal - Presentation
 
Swktm gdg presentation v1.0
Swktm gdg presentation v1.0Swktm gdg presentation v1.0
Swktm gdg presentation v1.0
 
I os 101:basic training rajan
I os 101:basic training   rajanI os 101:basic training   rajan
I os 101:basic training rajan
 
GSMA mWomen design challenge 2012
GSMA mWomen design challenge 2012GSMA mWomen design challenge 2012
GSMA mWomen design challenge 2012
 
Introduction to fragments in android
Introduction to fragments in androidIntroduction to fragments in android
Introduction to fragments in android
 
N locate - market perspective
N locate - market perspectiveN locate - market perspective
N locate - market perspective
 
Nepal load shedding apps
Nepal load shedding appsNepal load shedding apps
Nepal load shedding apps
 
Introduction to android
Introduction to androidIntroduction to android
Introduction to android
 
Ncell's scheme
Ncell's schemeNcell's scheme
Ncell's scheme
 
Android trainingforbeginners
Android trainingforbeginnersAndroid trainingforbeginners
Android trainingforbeginners
 
Scooba talk about your apps - vol 2
Scooba   talk about your apps - vol 2Scooba   talk about your apps - vol 2
Scooba talk about your apps - vol 2
 
Software quality and mobile apps
Software quality and mobile appsSoftware quality and mobile apps
Software quality and mobile apps
 
Mvc - Titanium
Mvc - TitaniumMvc - Titanium
Mvc - Titanium
 

Recently uploaded

Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
Peter Spielvogel
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
Vlad Stirbu
 

Recently uploaded (20)

Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
 

Design patterns

  • 1. Presentation on Design Patterns By Samundra Shrestha
  • 2. Patterns Each pattern describes a problem which occurs over and over again in our environment and then describes the core of the solution to that problem, in such a way that you can use this solution a million times over, without ever doing it the same twice. - Christopher Alexander, The Timeless Way of Building, 1979 So what are patterns?
  • 3. What are Patterns, really? Patterns catalog solutions to categories of problems They consist of A name A solution to a problem A description of the solution An assessment of the pros and cons of the pattern
  • 4. What are Patterns Not? 1. An algorithm. 2. An implementation. 3. The same every time you see them.
  • 5. Introduction to Design Patterns Gang of Four (GOF)  Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides  Authors of the original Design Patterns book Problem in software design  What – business and functionality requirements  How – particular design to meet the requirements  Work – Actual implementation, How put into practice.
  • 6. Principal and Strategies  Open Closed Principle  Dependency Inversion  Single Responsibility Policy Why ?  improve abilities as analyst and designer.  tackle situation in which no design pattern can be applied or design pattern has not been discovered yet.
  • 7. Contextual Design Open Closed Principle (OCP) "Modules, methods, classes should be open for extension, while closed for modifications."  Loose Coupling  Encapsulation
  • 8. Dependency Inversion Principle  Depend on the abstractions  Higher level module should not depend on lower level module. Both high and low level should depend on abstractions  Abstraction should not depend on details. Details should depend on abstractions.
  • 9. Categorization Creational Patterns Abstract Factory, Builder, Factory Method, Prototype, Singleton Behavioral Patterns Adapter, Bridge, Composite, Decorator, Facade, Flyweight, Proxy Structural Patterns Chain of Responsibility, Command, Interpreter, Iterator, Mediator, Memento, Observer, State, Strategy, Template, Method, Visitor Single instance in the whole application/platform
  • 10. Singleton Patterns Patterns by Examples Problem : Ensure a class has only one instance available in the system anytime. Output: Design Patterns Example
  • 11. Factory Pattern Patterns by Examples dynamically create instances of multiple classes based on runtime input. Output: This is system generated messageThis is console generated message
  • 12. Decorator Pattern Patterns by Examples best suited for altering or decorating portions of an existing object’s content or functionality without modifying the structure of the original object. Output : The CD contains the following tracks: 1) what-it-means. 2) brr. 3) good-bye.