SlideShare a Scribd company logo
1 of 19
Download to read offline
Design Patterns 101
$ whoami
Ritesh Agrawal
udr.ritesh@gmail.com
Software Engineer at Cyware Labs
https://www.linkedin.com/in/riteshagrawal18/
Considerations during Software Design
● Changing requirement/Feature Extension
● Technology changes
● Reusability
● Reduce Impact of code change
What is Design Pattern?
● Solution for the common software design problem
● It is a concept not implementation
● Technology independent
How?
Basics of OOP
● Abstraction
● Encapsulation
● Inheritance
● Polymorphism
Design Principles
Do Not Repeat Yourself (DRY)
● Aimed at reducing repetition of code
● Use of helper classes and utilities
Single Responsibility Principle
● Class, module or function should have single responsibility
● High Cohesiveness
● Single Reason of change
Open-Close Principle
● Software entities (classes, modules, functions, etc.) should be open for
extension, but closed for modification.
● Classes allow to subclass and alter the behaviour but not allowed to change
the existing code
Program to Interfaces, not Implementations
● Focus on what to be done rather than how
● Interact at more abstract level
● Helps in changing the details without affecting the client or caller
Encapsulate What Varies
● Change is the only constant
● Isolate the implementation details which changes frequently
● Can be business logic, library, interface, etc.
● Legacy code handling
Design Patterns
Strategic Pattern
● This pattern allows usage of different strategies by encapsulating the
algorithm
● Algorithm can vary independent of the client
● Client knows about the interface but not implementation
Adapter
● Joins functionality of incompatible interface
● Generalize interface of other functionality which can be helpful to change it in
future
● Using different product, libraries
Factory
● Abstracts process of creational of new objects
● Reduces code coupling by abstracting details of concrete classes
Singleton
● Restricts creation of one object per class
● Helpful in creating db connection objects
Question/Feedback ?
Thanks

More Related Content

What's hot

Iterative Development: Breaking from the Waterfall
Iterative Development: Breaking from the WaterfallIterative Development: Breaking from the Waterfall
Iterative Development: Breaking from the WaterfallAndrei Navarro
 
ProductCamp Amsterdam Session 9 Rudy Katchow
ProductCamp Amsterdam Session 9 Rudy KatchowProductCamp Amsterdam Session 9 Rudy Katchow
ProductCamp Amsterdam Session 9 Rudy KatchowProductCamp Amsterdam
 
Agile methodology
Agile methodologyAgile methodology
Agile methodologySerena Gray
 
System analysis methodologies
System analysis methodologiesSystem analysis methodologies
System analysis methodologiesuppipisara
 
Comparison of waterfall model and prototype model
Comparison of waterfall model and prototype modelComparison of waterfall model and prototype model
Comparison of waterfall model and prototype modelShubham Agrawal
 
Evolutionary models
Evolutionary modelsEvolutionary models
Evolutionary modelsPihu Goel
 
Mca5020 advanced software engineering-de
Mca5020   advanced software engineering-deMca5020   advanced software engineering-de
Mca5020 advanced software engineering-desmumbahelp
 
Knowlege Management
Knowlege ManagementKnowlege Management
Knowlege ManagementShashi Kumar
 
ITFT - Software prototyping
ITFT -  Software prototypingITFT -  Software prototyping
ITFT - Software prototypingShruti Kunwar
 

What's hot (13)

PROTOTYPING
PROTOTYPINGPROTOTYPING
PROTOTYPING
 
Iterative Development: Breaking from the Waterfall
Iterative Development: Breaking from the WaterfallIterative Development: Breaking from the Waterfall
Iterative Development: Breaking from the Waterfall
 
ProductCamp Amsterdam Session 9 Rudy Katchow
ProductCamp Amsterdam Session 9 Rudy KatchowProductCamp Amsterdam Session 9 Rudy Katchow
ProductCamp Amsterdam Session 9 Rudy Katchow
 
Agile methodology
Agile methodologyAgile methodology
Agile methodology
 
Model
ModelModel
Model
 
System analysis methodologies
System analysis methodologiesSystem analysis methodologies
System analysis methodologies
 
Comparison of waterfall model and prototype model
Comparison of waterfall model and prototype modelComparison of waterfall model and prototype model
Comparison of waterfall model and prototype model
 
PROTOTYPE MODEL
PROTOTYPE MODELPROTOTYPE MODEL
PROTOTYPE MODEL
 
Evolutionary models
Evolutionary modelsEvolutionary models
Evolutionary models
 
Spiral model
Spiral modelSpiral model
Spiral model
 
Mca5020 advanced software engineering-de
Mca5020   advanced software engineering-deMca5020   advanced software engineering-de
Mca5020 advanced software engineering-de
 
Knowlege Management
Knowlege ManagementKnowlege Management
Knowlege Management
 
ITFT - Software prototyping
ITFT -  Software prototypingITFT -  Software prototyping
ITFT - Software prototyping
 

Similar to Design Patterns 101 Explained

Benefits of using software design patterns and when to use design pattern
Benefits of using software design patterns and when to use design patternBenefits of using software design patterns and when to use design pattern
Benefits of using software design patterns and when to use design patternBeroza Paul
 
The Open-Closed Principle - the Original Version and the Contemporary Version
The Open-Closed Principle - the Original Version and the Contemporary VersionThe Open-Closed Principle - the Original Version and the Contemporary Version
The Open-Closed Principle - the Original Version and the Contemporary VersionPhilip Schwarz
 
Evgeniy Khyst - why does software design matter and how to keep it in good shape
Evgeniy Khyst - why does software design matter and how to keep it in good shapeEvgeniy Khyst - why does software design matter and how to keep it in good shape
Evgeniy Khyst - why does software design matter and how to keep it in good shapeAnna Shymchenko
 
Software Design Principles and Best Practices - Satyajit Dey
Software Design Principles and Best Practices - Satyajit DeySoftware Design Principles and Best Practices - Satyajit Dey
Software Design Principles and Best Practices - Satyajit DeyCefalo
 
Object Oriented, Design patterns and data modelling worshop
Object Oriented, Design patterns and data modelling worshopObject Oriented, Design patterns and data modelling worshop
Object Oriented, Design patterns and data modelling worshopMohammad Shawahneh
 
Extreme programming
Extreme programmingExtreme programming
Extreme programmingAdrianCuza
 
Basic software engineering principles - Session 1
Basic software engineering principles - Session 1Basic software engineering principles - Session 1
Basic software engineering principles - Session 1LahiruWijewardana1
 
Software development philosophies v1
Software development philosophies v1Software development philosophies v1
Software development philosophies v1Praveen Nair
 
From good to solid: How to become a better developer
From good to solid: How to become a better developerFrom good to solid: How to become a better developer
From good to solid: How to become a better developerKaterina Trajchevska
 
Code Craftsmanship Checklist
Code Craftsmanship ChecklistCode Craftsmanship Checklist
Code Craftsmanship ChecklistRyan Polk
 
DesignPrinciples-and-DesignPatterns
DesignPrinciples-and-DesignPatternsDesignPrinciples-and-DesignPatterns
DesignPrinciples-and-DesignPatternsBasavaraj Patil
 
Procedural programming
Procedural programmingProcedural programming
Procedural programmingSujit Kumar
 
Dependency Injection, Design Principles and Patterns
Dependency Injection, Design Principles and PatternsDependency Injection, Design Principles and Patterns
Dependency Injection, Design Principles and PatternsJuan Lopez
 
Software Engineering Primer
Software Engineering PrimerSoftware Engineering Primer
Software Engineering PrimerGeorg Buske
 
Building Sustainable Software: An Introduction to Software Engineering
Building Sustainable Software: An Introduction to Software EngineeringBuilding Sustainable Software: An Introduction to Software Engineering
Building Sustainable Software: An Introduction to Software EngineeringMuhammad Shehata
 
What is agile model?Working of agile model
What is agile model?Working of agile modelWhat is agile model?Working of agile model
What is agile model?Working of agile modelzoomers
 
Becoming a better developer by using the SOLID design principles
Becoming a better developer by using the SOLID design principlesBecoming a better developer by using the SOLID design principles
Becoming a better developer by using the SOLID design principlesKaterina Trajchevska
 

Similar to Design Patterns 101 Explained (20)

Benefits of using software design patterns and when to use design pattern
Benefits of using software design patterns and when to use design patternBenefits of using software design patterns and when to use design pattern
Benefits of using software design patterns and when to use design pattern
 
android principle.pptx
android principle.pptxandroid principle.pptx
android principle.pptx
 
The Open-Closed Principle - the Original Version and the Contemporary Version
The Open-Closed Principle - the Original Version and the Contemporary VersionThe Open-Closed Principle - the Original Version and the Contemporary Version
The Open-Closed Principle - the Original Version and the Contemporary Version
 
Evgeniy Khyst - why does software design matter and how to keep it in good shape
Evgeniy Khyst - why does software design matter and how to keep it in good shapeEvgeniy Khyst - why does software design matter and how to keep it in good shape
Evgeniy Khyst - why does software design matter and how to keep it in good shape
 
Software Design Principles and Best Practices - Satyajit Dey
Software Design Principles and Best Practices - Satyajit DeySoftware Design Principles and Best Practices - Satyajit Dey
Software Design Principles and Best Practices - Satyajit Dey
 
Soild principles
Soild principlesSoild principles
Soild principles
 
Object Oriented, Design patterns and data modelling worshop
Object Oriented, Design patterns and data modelling worshopObject Oriented, Design patterns and data modelling worshop
Object Oriented, Design patterns and data modelling worshop
 
Extreme programming
Extreme programmingExtreme programming
Extreme programming
 
Basic software engineering principles - Session 1
Basic software engineering principles - Session 1Basic software engineering principles - Session 1
Basic software engineering principles - Session 1
 
Software development philosophies v1
Software development philosophies v1Software development philosophies v1
Software development philosophies v1
 
From good to solid: How to become a better developer
From good to solid: How to become a better developerFrom good to solid: How to become a better developer
From good to solid: How to become a better developer
 
Code Craftsmanship Checklist
Code Craftsmanship ChecklistCode Craftsmanship Checklist
Code Craftsmanship Checklist
 
Agile model
Agile modelAgile model
Agile model
 
DesignPrinciples-and-DesignPatterns
DesignPrinciples-and-DesignPatternsDesignPrinciples-and-DesignPatterns
DesignPrinciples-and-DesignPatterns
 
Procedural programming
Procedural programmingProcedural programming
Procedural programming
 
Dependency Injection, Design Principles and Patterns
Dependency Injection, Design Principles and PatternsDependency Injection, Design Principles and Patterns
Dependency Injection, Design Principles and Patterns
 
Software Engineering Primer
Software Engineering PrimerSoftware Engineering Primer
Software Engineering Primer
 
Building Sustainable Software: An Introduction to Software Engineering
Building Sustainable Software: An Introduction to Software EngineeringBuilding Sustainable Software: An Introduction to Software Engineering
Building Sustainable Software: An Introduction to Software Engineering
 
What is agile model?Working of agile model
What is agile model?Working of agile modelWhat is agile model?Working of agile model
What is agile model?Working of agile model
 
Becoming a better developer by using the SOLID design principles
Becoming a better developer by using the SOLID design principlesBecoming a better developer by using the SOLID design principles
Becoming a better developer by using the SOLID design principles
 

Recently uploaded

Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendArshad QA
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfCionsystems
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 

Recently uploaded (20)

Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and Backend
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdf
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 

Design Patterns 101 Explained