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

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
 
Let us understand design pattern
Let us understand design patternLet us understand design pattern
Let us understand design pattern
 
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 Pattern For C# Part 1
Design Pattern For C# Part 1Design Pattern For C# Part 1
Design Pattern For C# Part 1
 
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
 

Recently uploaded

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 

Design Patterns For 70% Of Programmers In The World