SlideShare a Scribd company logo
1 of 60
Design Patterns for 70% of genious programmers Aamir Khan Solution Architect
Design Patterns for 70% of programmers in the world Saurabh Verma Solution Architect  I blog at http://www.domaindrivendesign.info
Agenda ,[object Object],[object Object],[object Object],[object Object],[object Object]
Normal Classes vs Abstract Classes vs Interfaces Normal Class:  This is a normal class   Abstract Class:  These cannot be instantiated directly.  They may provide partial implementations and exists solely for the purpose of inheritance.  Interfaces:  Defines a contract. Concrete implementations needs to implement each property and method as per contract. Shut up ! We know all this
Million Dollar Question? What is Why?
Normal Class vs Abstract Class? If a particular class is a entity which is not required to be instantiated by the application directly, go for  Abstract Class Employee can be abstract class
Abstract Class vs Interfaces? If a particular class contains any default behavior, go for  Abstract Class If every concrete class has its own implementation, go for Interfaces Work – Management, Programming
MOVIES & ACTORS Shahrukh Khan Salman Khan riding bike Actors in a Movie
IS-A vs HAS-A vs CAN-DO IS-A Inheritance Shahrukh Khan is an ACTOR HAS-A Composition Movie has ACTORS CAN-DO Interfaces Salman Khan can DRIVE BIKE IS-A  Inheritance Shahrukh Khan is an ACTOR HAS-A  Composition Movie has ACTORS CAN-DO  Interfaces Salman Khan can DRIVE BIKE
What is a Pattern ,[object Object],[object Object],[object Object],[object Object]
History of Software Patterns
What Wikipedia says, ,[object Object],[object Object],[object Object]
Let’s understand design patterns by purpose
Let’s understand the purpose + Creational Patterns Structural Patterns Final Product Behavioral Patterns
Let’s understand the purpose
Design Patterns as per their  PURPOSE
Creational Patterns
Factory Method
Factory Method ,[object Object],[object Object],[object Object]
Factory Method System.Data.SqlClient.SqlClientFactory
Abstract Factory Pattern
Abstract Factory Pattern ,[object Object],[object Object]
Abstract Factory Method System.Data.Common.DbProviderFactories
Singleton Pattern
Singleton Pattern ,[object Object],[object Object],[object Object]
Singleton Pattern System.Data.SqlClient.SqlClientFactory
Structural Patterns
Façade Pattern
Façade Pattern ,[object Object],[object Object],[object Object]
Façade Pattern Its all about the service
Decorator Pattern
Decorator Pattern ,[object Object],[object Object],[object Object],simple actress ( act ) in role of modern girl (go out and  act ) in role of homely girl (be in home and  act )
Decorator Pattern System.IO.BufferedStream:Stream
Composite Pattern
Composite Pattern ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Composite Pattern System.Web.UI.Control   (Render Mechanism)
Composite Pattern
Adapter Pattern
Adapter Pattern ,[object Object],[object Object],[object Object],Application Framework Adapter Legacy Component
Adapter Pattern GearsTypelib.HtmlDialogHostClass (Interop.GearsTypelib)
Decorator vs Adapter Decorator looks like Adapter which “decorates” an existing class to make it compatible. Though, Decorator doesn’t wants you to decorate every method in the Adapted class. But who has stopped from doing it. “ Never underestimate the power of a developer”
Decorator vs Façade Façade is a way of hiding a complex system inside a simpler interface, whereas Decorator adds function by wrapping a class.
Behavioural Patterns
Command Pattern
Command Pattern ,[object Object],[object Object],[object Object],[object Object],One Receiver and Multiple actions
Command Pattern System.ComponentModel.Design.MenuCommand
Command Pattern Saurabh.Learning.DesignPatterns.Patterns.CommandPattern
Strategy Pattern
Strategy Pattern ,[object Object],[object Object],[object Object]
Strategy Pattern System.Collections.ArrayList
Template Method
Template Method ,[object Object],[object Object],[object Object],[object Object]
Template Method
Strategy Pattern vs Template Method ,[object Object],[object Object]
I hate my job
Top 5 ADVICES NOT TO FOLLOW
Reflect when you want  
Answers, anybody?
CONTENT STOLEN FROM   BOOKS: Head First Design Patterns Design Patterns in C# Design Patterns WEBSITES: Wikipedia, MSDN, doFactory and GOOGLE
Learn it all,   at my blog http://www.domaindrivendesign.info Don’t contact  me at, saurabh.net [at] gmail.com Saurabh Verma Solution Architect

More Related Content

What's hot

Шаблоны разработки ПО. Часть 1. Введние
Шаблоны разработки ПО. Часть 1. ВведниеШаблоны разработки ПО. Часть 1. Введние
Шаблоны разработки ПО. Часть 1. Введние
Sergey Nemchinsky
 
7. sequence and collaboration diagrams
7. sequence and collaboration diagrams7. sequence and collaboration diagrams
7. sequence and collaboration diagrams
APU
 

What's hot (20)

Gof design patterns
Gof design patternsGof design patterns
Gof design patterns
 
Design Pattern For C# Part 1
Design Pattern For C# Part 1Design Pattern For C# Part 1
Design Pattern For C# Part 1
 
UML
UMLUML
UML
 
Facade pattern
Facade patternFacade pattern
Facade pattern
 
Programação Orientada A Objectos (Poo)
Programação Orientada A Objectos (Poo)Programação Orientada A Objectos (Poo)
Programação Orientada A Objectos (Poo)
 
Facade Pattern
Facade PatternFacade Pattern
Facade Pattern
 
Design Patterns
Design PatternsDesign Patterns
Design Patterns
 
POO - 09 - Entradas e Saídas em Java
POO - 09 - Entradas e Saídas em JavaPOO - 09 - Entradas e Saídas em Java
POO - 09 - Entradas e Saídas em Java
 
DESIGN PATTERNS: Strategy Patterns
DESIGN PATTERNS: Strategy PatternsDESIGN PATTERNS: Strategy Patterns
DESIGN PATTERNS: Strategy Patterns
 
Software Design Patterns
Software Design PatternsSoftware Design Patterns
Software Design Patterns
 
OO Development 1 - Introduction to Object-Oriented Development
OO Development 1 - Introduction to Object-Oriented DevelopmentOO Development 1 - Introduction to Object-Oriented Development
OO Development 1 - Introduction to Object-Oriented Development
 
Design pattern
Design patternDesign pattern
Design pattern
 
Command Design Pattern
Command Design PatternCommand Design Pattern
Command Design Pattern
 
Шаблоны разработки ПО. Часть 1. Введние
Шаблоны разработки ПО. Часть 1. ВведниеШаблоны разработки ПО. Часть 1. Введние
Шаблоны разработки ПО. Часть 1. Введние
 
Flyweight pattern
Flyweight patternFlyweight pattern
Flyweight pattern
 
Design patterns
Design patternsDesign patterns
Design patterns
 
7. sequence and collaboration diagrams
7. sequence and collaboration diagrams7. sequence and collaboration diagrams
7. sequence and collaboration diagrams
 
Bridge Design Pattern
Bridge Design PatternBridge Design Pattern
Bridge Design Pattern
 
Software Architecture: views and viewpoints
Software Architecture: views and viewpointsSoftware Architecture: views and viewpoints
Software Architecture: views and viewpoints
 
Design Pattern
Design PatternDesign Pattern
Design Pattern
 

Viewers also liked

Oil-Refinery Planning & Scheduling Optimization
Oil-Refinery Planning & Scheduling OptimizationOil-Refinery Planning & Scheduling Optimization
Oil-Refinery Planning & Scheduling Optimization
Alkis Vazacopoulos
 
Architectural Professional Practice - Construction Documents
Architectural Professional Practice - Construction DocumentsArchitectural Professional Practice - Construction Documents
Architectural Professional Practice - Construction Documents
Galala University
 
Distillation Blending and Cutpoint Temperature Optimization in Scheduling Ope...
Distillation Blending and Cutpoint Temperature Optimization in Scheduling Ope...Distillation Blending and Cutpoint Temperature Optimization in Scheduling Ope...
Distillation Blending and Cutpoint Temperature Optimization in Scheduling Ope...
Brenno Menezes
 
CRUDE-OIL BLEND SCHEDULING OPTIMIZATION OF AN INDUSTRIAL-SIZED REFINERY: A DI...
CRUDE-OIL BLEND SCHEDULING OPTIMIZATION OF AN INDUSTRIAL-SIZED REFINERY: A DI...CRUDE-OIL BLEND SCHEDULING OPTIMIZATION OF AN INDUSTRIAL-SIZED REFINERY: A DI...
CRUDE-OIL BLEND SCHEDULING OPTIMIZATION OF AN INDUSTRIAL-SIZED REFINERY: A DI...
Brenno Menezes
 

Viewers also liked (20)

Enercept Power Point[1]
Enercept Power Point[1]Enercept Power Point[1]
Enercept Power Point[1]
 
Energy resource management
Energy resource managementEnergy resource management
Energy resource management
 
Crude-Oil Scheduling Technology: moving from simulation to optimization
Crude-Oil Scheduling Technology: moving from simulation to optimizationCrude-Oil Scheduling Technology: moving from simulation to optimization
Crude-Oil Scheduling Technology: moving from simulation to optimization
 
Steel building Graded Unit Civil Engineering Project HND Project Glasgow Kel...
Steel building Graded Unit  Civil Engineering Project HND Project Glasgow Kel...Steel building Graded Unit  Civil Engineering Project HND Project Glasgow Kel...
Steel building Graded Unit Civil Engineering Project HND Project Glasgow Kel...
 
Crude-Oil Blend Scheduling Optimization: An Application with Multi-Million D...
Crude-Oil Blend Scheduling Optimization:  An Application with Multi-Million D...Crude-Oil Blend Scheduling Optimization:  An Application with Multi-Million D...
Crude-Oil Blend Scheduling Optimization: An Application with Multi-Million D...
 
Oil-Refinery Planning & Scheduling Optimization
Oil-Refinery Planning & Scheduling OptimizationOil-Refinery Planning & Scheduling Optimization
Oil-Refinery Planning & Scheduling Optimization
 
Fnbe0115 Integrated - awesome
Fnbe0115 Integrated - awesomeFnbe0115 Integrated - awesome
Fnbe0115 Integrated - awesome
 
Architectural Professional Practice - Construction Documents
Architectural Professional Practice - Construction DocumentsArchitectural Professional Practice - Construction Documents
Architectural Professional Practice - Construction Documents
 
Distillation Blending and Cutpoint Temperature Optimization in Scheduling Ope...
Distillation Blending and Cutpoint Temperature Optimization in Scheduling Ope...Distillation Blending and Cutpoint Temperature Optimization in Scheduling Ope...
Distillation Blending and Cutpoint Temperature Optimization in Scheduling Ope...
 
Distillation Blending and Cutpoint Temperature Optimization (DBCTO) in Schedu...
Distillation Blending and Cutpoint Temperature Optimization (DBCTO) in Schedu...Distillation Blending and Cutpoint Temperature Optimization (DBCTO) in Schedu...
Distillation Blending and Cutpoint Temperature Optimization (DBCTO) in Schedu...
 
Schedule Development
Schedule DevelopmentSchedule Development
Schedule Development
 
CRUDE-OIL BLEND SCHEDULING OPTIMIZATION OF AN INDUSTRIAL-SIZED REFINERY: A DI...
CRUDE-OIL BLEND SCHEDULING OPTIMIZATION OF AN INDUSTRIAL-SIZED REFINERY: A DI...CRUDE-OIL BLEND SCHEDULING OPTIMIZATION OF AN INDUSTRIAL-SIZED REFINERY: A DI...
CRUDE-OIL BLEND SCHEDULING OPTIMIZATION OF AN INDUSTRIAL-SIZED REFINERY: A DI...
 
Schedule Design PMI
Schedule Design PMISchedule Design PMI
Schedule Design PMI
 
5case
5case5case
5case
 
Strategic brand management
Strategic brand managementStrategic brand management
Strategic brand management
 
Design and analasys of a g+2 residential building
Design and analasys of a g+2 residential building Design and analasys of a g+2 residential building
Design and analasys of a g+2 residential building
 
Design and analasys of a g+3 residential building using staad
Design and analasys of a g+3 residential building using staadDesign and analasys of a g+3 residential building using staad
Design and analasys of a g+3 residential building using staad
 
Profit Impact of Market Strategies (PIMS)
Profit Impact of Market Strategies (PIMS)Profit Impact of Market Strategies (PIMS)
Profit Impact of Market Strategies (PIMS)
 
DESIGN AND ANALAYSIS OF MULTI STOREY BUILDING USING STAAD PRO
DESIGN AND ANALAYSIS OF MULTI STOREY BUILDING USING STAAD PRODESIGN AND ANALAYSIS OF MULTI STOREY BUILDING USING STAAD PRO
DESIGN AND ANALAYSIS OF MULTI STOREY BUILDING USING STAAD PRO
 
Multistorey building
Multistorey buildingMultistorey building
Multistorey building
 

Similar to Design Patterns For 70% Of Programmers In The World

P Training Presentation
P Training PresentationP Training Presentation
P Training Presentation
Gaurav Tyagi
 
M04 Design Patterns
M04 Design PatternsM04 Design Patterns
M04 Design Patterns
Dang Tuan
 

Similar to Design Patterns For 70% Of Programmers In The World (20)

P Training Presentation
P Training PresentationP Training Presentation
P Training Presentation
 
Gof design pattern
Gof design patternGof design pattern
Gof design pattern
 
Introduction To Design Patterns
Introduction To Design PatternsIntroduction To Design Patterns
Introduction To Design Patterns
 
Design patterns
Design patternsDesign patterns
Design patterns
 
Software design and Architecture.pptx
Software design and Architecture.pptxSoftware design and Architecture.pptx
Software design and Architecture.pptx
 
Typescript design patterns applied to sharepoint framework - Sharepoint Satur...
Typescript design patterns applied to sharepoint framework - Sharepoint Satur...Typescript design patterns applied to sharepoint framework - Sharepoint Satur...
Typescript design patterns applied to sharepoint framework - Sharepoint Satur...
 
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
 
Oops design pattern intro
Oops design pattern intro Oops design pattern intro
Oops design pattern intro
 
Jump start to OOP, OOAD, and Design Pattern
Jump start to OOP, OOAD, and Design PatternJump start to OOP, OOAD, and Design Pattern
Jump start to OOP, OOAD, and Design Pattern
 
Jump Start To Ooad And Design Patterns
Jump Start To Ooad And Design PatternsJump Start To Ooad And Design Patterns
Jump Start To Ooad And Design Patterns
 
Design patterns
Design patternsDesign patterns
Design patterns
 
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 Patterns
Design PatternsDesign Patterns
Design Patterns
 
Ooad
OoadOoad
Ooad
 
Design Patterns - 01 Introduction and Decorator Pattern
Design Patterns - 01 Introduction and Decorator PatternDesign Patterns - 01 Introduction and Decorator Pattern
Design Patterns - 01 Introduction and Decorator Pattern
 
Creational Design Patterns
Creational Design PatternsCreational Design Patterns
Creational Design Patterns
 
Architecture and design
Architecture and designArchitecture and design
Architecture and design
 
M04 Design Patterns
M04 Design PatternsM04 Design Patterns
M04 Design Patterns
 
Design Pattern with Actionscript
Design Pattern with ActionscriptDesign Pattern with Actionscript
Design Pattern with Actionscript
 
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
 

Recently uploaded

Recently uploaded (20)

Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfSimplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
 
Strategic AI Integration in Engineering Teams
Strategic AI Integration in Engineering TeamsStrategic AI Integration in Engineering Teams
Strategic AI Integration in Engineering Teams
 
Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in MinutesSpeed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutes
 
IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024
 
ECS 2024 Teams Premium - Pretty Secure
ECS 2024   Teams Premium - Pretty SecureECS 2024   Teams Premium - Pretty Secure
ECS 2024 Teams Premium - Pretty Secure
 
AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101
 
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
 
Syngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdfSyngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdf
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024
 
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone KomSalesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
 
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
 
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfWhere to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
 
PLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. StartupsPLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. Startups
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
 
IESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIESVE for Early Stage Design and Planning
IESVE for Early Stage Design and Planning
 
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfThe Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
 
Optimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityOptimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through Observability
 
A Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System StrategyA Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System Strategy
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
 

Design Patterns For 70% Of Programmers In The World