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

Design Patterns
Design PatternsDesign Patterns
Design Patterns
soms_1
 

What's hot (20)

Design pattern
Design patternDesign pattern
Design pattern
 
Introduction to Eclipse IDE
Introduction to Eclipse IDEIntroduction to Eclipse IDE
Introduction to Eclipse IDE
 
An Introduction to Software Architecture
An Introduction to Software ArchitectureAn Introduction to Software Architecture
An Introduction to Software Architecture
 
Factory Method Pattern
Factory Method PatternFactory Method Pattern
Factory Method Pattern
 
Introduction to jest
Introduction to jestIntroduction to jest
Introduction to jest
 
Design Patterns Illustrated
Design Patterns IllustratedDesign Patterns Illustrated
Design Patterns Illustrated
 
Software Engineering - chp5- software architecture
Software Engineering - chp5- software architectureSoftware Engineering - chp5- software architecture
Software Engineering - chp5- software architecture
 
Gang of Four in Java
Gang of Four in Java Gang of Four in Java
Gang of Four in Java
 
Factory Design Pattern
Factory Design PatternFactory Design Pattern
Factory Design Pattern
 
Design Patterns
Design PatternsDesign Patterns
Design Patterns
 
Design Patterns (Examples in .NET)
Design Patterns (Examples in .NET)Design Patterns (Examples in .NET)
Design Patterns (Examples in .NET)
 
Software design patterns ppt
Software design patterns pptSoftware design patterns ppt
Software design patterns ppt
 
Dependency Injection
Dependency InjectionDependency Injection
Dependency Injection
 
Solid principles, Design Patterns, and Domain Driven Design
Solid principles, Design Patterns, and Domain Driven DesignSolid principles, Design Patterns, and Domain Driven Design
Solid principles, Design Patterns, and Domain Driven Design
 
Solid principles
Solid principlesSolid principles
Solid principles
 
Introduction to Design Pattern
Introduction to Design  PatternIntroduction to Design  Pattern
Introduction to Design Pattern
 
React introduction
React introductionReact introduction
React introduction
 
Introducing Clean Architecture
Introducing Clean ArchitectureIntroducing Clean Architecture
Introducing Clean Architecture
 
Automation Testing using Selenium
Automation Testing using SeleniumAutomation Testing using Selenium
Automation Testing using Selenium
 
React Native
React NativeReact Native
React Native
 

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
 
Ooad
OoadOoad
Ooad
gantib
 
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

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
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 

Recently uploaded (20)

DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
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
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
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
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
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
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
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...
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
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
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
"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 ...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
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, ...
 

Design Patterns For 70% Of Programmers In The World